- Overview
- Documents
Naver is a jQuery plugin for responsive navigation. Part of the Formstone Library.
Source: formstone.it
1. INCLUDE JS AND CSS FILES
<script src="jquery.min.js" type="text/javascript"></script> <script src="jquery.fs.naver.js" type="text/javascript"></script> <link href="jquery.fs.naver.css" rel="stylesheet">
2. HTML
<nav> <a href="#">Home</a> <a href="#">About</a> <a href="#">Contact</a> </nav>
3. JAVASCRIPT
$("nav").naver();
4. OPTIONS
Options are set by passing a valid options object at initialization or to the public "defaults" method. You can also set custom options for a specific instance by attaching a data-boxer-options attribute containing a properly formatted JSON object to the target element.
NAME | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
customClass | string | '' | Class applied to instance |
label | boolean | true | Display handle width label |
labels.closed | string | 'Navigation' | Closed state text |
labels.open | string | 'Close' | Open state text |
maxWidth | string | '980px' | Width at which to auto-disable plugin |
5. EVENTS
Events are triggered on the target instance's element, unless otherwise stated.
OPTION | DESCRIPTION |
---|---|
open.naver | Navigation opened |
close.naver | Navigation closed |
6. METHODS
Methods are publicly available to all active instances, unless otherwise stated.
close: Closes instance
$(".target").naver("close");
defaults: Sets default plugin options
$.naver("defaults", opts);
PARAMETER | TYPE | DEFAULT | DESCRIPTION |
---|---|---|---|
opts | object | {} | Options object |
disable: Disables instance
$(".target").naver("disable");
destroy: Destroys instance
$(".target").naver("destroy");
enable: Enables instance
$(".target").naver("enable");
open: Opens instance
$(".target").naver("open");