Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alizahid/slinky
A light-weight, responsive, mobile-like navigation menu plugin
https://github.com/alizahid/slinky
babel css es6 javascript jquery menu mobile navigation plugin sass webpack yarn
Last synced: 5 days ago
JSON representation
A light-weight, responsive, mobile-like navigation menu plugin
- Host: GitHub
- URL: https://github.com/alizahid/slinky
- Owner: alizahid
- License: mit
- Created: 2014-04-15T09:26:51.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T01:16:26.000Z (about 2 years ago)
- Last Synced: 2025-01-25T21:06:35.384Z (12 days ago)
- Topics: babel, css, es6, javascript, jquery, menu, mobile, navigation, plugin, sass, webpack, yarn
- Language: JavaScript
- Homepage: https://slinky.js.org
- Size: 2.76 MB
- Stars: 674
- Watchers: 19
- Forks: 111
- Open Issues: 30
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
![](./slinky.png)
# Slinky
Rather sweet menus
A light-weight, responsive, mobile-like navigation menu plugin
### [Demo](https://alizahid.github.io/slinky/)
## Installation
Download the [latest version](https://github.com/alizahid/slinky/releases). The files you need are
- [dist/slinky.min.js](dist/slinky.min.js)
- [dist/slinky.min.css](dist/slinky.min.css)### Bower
```
bower install jquery-slinky
```Include these files
```html
```
### NPM
```
npm install jquery-slinky
```Include these files
```html
```
## Usage
```javascript
const slinky = $('.menu').slinky(options)
```## Options
| Option | Default | Description |
| -------- | ---------------------- | ------------------------------------------------- |
| `resize` | `true` | Resize menu height to match content on navigation |
| `speed` | `300` | Animation speed in `milliseconds` |
| `theme` | `slinky-theme-default` | Slinky theme |
| `title` | `false` | Show title of sub menu |## API
### `.home(animate)`
Navigate back to the root menu
| Option | Default value | Description |
| --------- | ------------- | ------------------------------ |
| `animate` | `true` | Pass `false` to skip animation |### `.jump(target, animate)`
Navigate to a sub menu
| Option | Default value | Description |
| --------- | ------------- | ----------------------------------- |
| `to` | | Selector for `ul` target to jump to |
| `animate` | `true` | Pass `false` to skip animation |### `.destroy()`
Remove Slinky
## Tips
- Set `.active` on a `ul` element to jump there on init