|
2 | 2 |
|
3 | 3 | jQuery sliding menu |
4 | 4 |
|
5 | | -A light-weight, responsive, mobile-like menu plugin |
| 5 | +A light-weight, responsive, mobile-like navigation menu plugin |
6 | 6 |
|
7 | 7 | ### [Demo](http://alizahid.github.io/slinky) |
8 | 8 |
|
9 | | -### Installation |
| 9 | +## Installation |
10 | 10 |
|
11 | 11 | Download the [latest version](https://github.com/alizahid/slinky/archive/gh-pages.zip). The files you need are; |
12 | 12 |
|
13 | | -- assets/js/jquery.slinky.js |
14 | | -- assets/css/jquery.slinky.css |
| 13 | +- [dist/jquery.slinky.js](dist/jquery.slinky.js) |
| 14 | +- [dist/jquery.slinky.css](dist/jquery.slinky.css) |
15 | 15 |
|
16 | | -### Usage |
| 16 | +### Bower |
17 | 17 |
|
18 | | - $('.menu').slinky(options); |
| 18 | + bower install slinky |
19 | 19 |
|
20 | | -### Options |
| 20 | +Include these files; |
| 21 | + |
| 22 | + <script src="bower_components/slinky/dist/jquery.slinky.js"></script> |
| 23 | + |
| 24 | + <link rel="stylesheet" src="bower_components/slinky/dist/jquery.slinky.css"> |
| 25 | + |
| 26 | +### NPM |
| 27 | + |
| 28 | + npm install slinky |
| 29 | + |
| 30 | +Include these files; |
| 31 | + |
| 32 | + <script src="node_modules/slinky/dist/jquery.slinky.js"></script> |
| 33 | + |
| 34 | + <link rel="stylesheet" src="node_modules/slinky/dist/jquery.slinky.css"> |
| 35 | + |
| 36 | +## Usage |
| 37 | + |
| 38 | + var slinky = $('.menu').slinky(options); |
| 39 | + |
| 40 | +## Options |
21 | 41 |
|
22 | 42 | Option | Default value | Description |
23 | 43 | ------ | ------------- | ----------- |
24 | | -`label` | 'Back' | Label for the back button. Set to `true` to use the link's own label |
25 | | -`title` | `false` | Set to `true` to show title of current menu level |
| 44 | +`label` | 'Back' | Label for the back button. Pass `true` to use the link's own label |
| 45 | +`title` | `false` | Pass `true` to show title of current menu level |
26 | 46 | `speed` | `300` | Animation speed in milliseconds |
27 | | -`resize` | `true` | Resize menu height to match content |
| 47 | +`resize` | `true` | Resize menu height to match content on navigation |
| 48 | + |
| 49 | +## API |
| 50 | + |
| 51 | +### .home() |
| 52 | + |
| 53 | +Navigate back to the main menu |
| 54 | + |
| 55 | +Option | Default value | Description |
| 56 | +------ | ------------- | ----------- |
| 57 | +`animate` | `true` | Pass false to skip animation |
| 58 | + |
| 59 | +### .jump() |
| 60 | + |
| 61 | +Navigate to a sub menu |
| 62 | + |
| 63 | +Option | Default value | Description |
| 64 | +------ | ------------- | ----------- |
| 65 | +`to` | | Pass a selector for the ul element to jump to |
| 66 | +`animate` | `true` | Pass false to skip animation |
| 67 | + |
| 68 | +### .destroy() |
| 69 | + |
| 70 | +Remove slinky |
| 71 | + |
| 72 | +## Tips |
| 73 | + |
| 74 | +- Set `.active` on a `ul` element to jump there on init |
0 commit comments