An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

        

Yii2 Superfish
==============
Superfish assets for Yii2 projects

Installation
------------

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)