https://github.com/derekisbusy/yii2-superfish
Superfish assets for Yii2 projects
https://github.com/derekisbusy/yii2-superfish
Last synced: 2 months ago
JSON representation
Superfish assets for Yii2 projects
- Host: GitHub
- URL: https://github.com/derekisbusy/yii2-superfish
- Owner: derekisbusy
- Created: 2019-06-23T19:46:21.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-23T21:29:28.000Z (almost 6 years ago)
- Last Synced: 2025-01-20T09:46:20.973Z (4 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Yii2 Superfish
==============
Superfish assets for Yii2 projectsInstallation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist derekisbusy/yii2-superfish:dev-master
```or add
```
"derekisbusy/yii2-superfish": "dev-master"
```to the require section of your `composer.json` file.
Usage
-----Once the extension is installed, simply use it by adding it to your view :
```php
use \derekisbusy\superfish\SuperfishAsset;SuperfishAsset::register($this);
```or by adding it to another assets dependencies list :
```php
public $depends = [
'derekisbusy\superfish\SuperfishAsset'
];
```Then use superfish in your HTML :
```html
Menu
jQuery(document).ready(function() {
jQuery('ul.sf-menu').superfish();
});
```
Resources
---------
* [Superfish examples](https://superfish.joelbirch.design/examples/)
* [Yii2 assets](https://www.yiiframework.com/doc/guide/2.0/en/structure-assets)