Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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

```

### 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 ,

, or something else
});
```