Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aaronbushnell/layernav
A small, jQuery-powered navigation menu for mobile and up
https://github.com/aaronbushnell/layernav
Last synced: about 1 month ago
JSON representation
A small, jQuery-powered navigation menu for mobile and up
- Host: GitHub
- URL: https://github.com/aaronbushnell/layernav
- Owner: aaronbushnell
- Created: 2014-11-25T04:02:53.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-29T17:12:41.000Z (almost 9 years ago)
- Last Synced: 2024-11-10T06:08:00.226Z (about 1 month ago)
- Language: JavaScript
- Size: 50.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LayerNav
A small, jQuery-powered navigation menu for mobile and up## Install
```sh
npm install layernav # or
bower install layernav
```## Usage
### 1. Include CSS
```html```
### 2. Create navigation menu (use any class you'd like)
```html
- Lorem ipsum dolor
-
Lorem ipsum dolor
- Lorem ipsum dolor
- Lorem ipsum dolor
- Lorem ipsum dolor
```
### 3. Include scripts
```html
$('.js-main-nav').layerNav();
```
## Notes
- If using `` and need IE 8 support, make sure you use [an HTML5 shiv](https://github.com/aFarkas/html5shiv)
## Optional configurations:
```js
$('.js-main-nav').layerNav({
lgWidth: 500, // Size to switch to desktop-mode
toggleButton: '.js-tiny-nav-toggle', // Set to a custom element if you'd like to position the mobile toggle button
toggleButtonText: 'Menu', // Text of the toggle button
expandIcons: false, // If false, any parent link will open menu on click, if true every parent link has an expand icon to view items below
expandIconsEl: 'span' // Set the expand icon element to a ,
});
```