-
Notifications
You must be signed in to change notification settings - Fork 2
v1.0 Documentation
Scott Elwood edited this page Sep 18, 2013
·
1 revision
All of these are the default options and more in depth information can be found further down the page.
$('nav').tacky
itemSelector: 'a'
parentSelector: null
tackedClass: 'tacked'
activeClass: 'active'
toggleClass: 'toggle'
openClass: 'open'
floating: false
scrollSpeed: 500
scrollEasing: ''
closeMenuSize: 700
markerOffset: .4
Option | Description | Type | Acceptable Values |
---|---|---|---|
itemSelector | A CSS selector which determines the internal navigation links | String | A CSS selector ending with the 'a' selector. Such as 'li.foo a' |
parentSelector | A CSS selector used to find the parent which the active CSS class gets applied to. | String | Any CSS selector, such as ".river" or "#song" |
tackedClass | The CSS class which gets applied to the nav when you want it to stay fixed. | String | Any string. Do not include the '.' for the class name. |
activeClass | The class that gets applied to the currently active menu item. | String | Any string. Do not include the '.' for the class name. |
toggleClass | The class used to determine the element which can toggle the menu open. | String | Any string. Do not include the '.' for the class name. |
openClass | The class applied to the nav when the menu is opened by the toggle button. | String | Any string. Do not include the '.' for the class name. |
floating | Used for navs that don't stick to the top, such as side navs. | Boolean | True, False |
scrollSpeed | Speed in milliseconds in which to scroll to an anchor link. | Integer | Any number >= 0 |
scrollEasing | If using jQuery UI, you can set the easing for the anchor link scrolling. | String | jQuery UI Easing |
closeMenuWidth | If the menu is open and the window is resized to greater than this number, remove the open class. | Integer | Any integer >= 1 |
markerOffset | A way to control where on the page determines the currently active anchor link. It takes a percentage decimal. For example, if markerOffset is set to .5, then the active anchor link is the section directly in the middle of the page. | Integer | Any integer between 0 and 1 |
Call the destroy function on the nav.
$("nav").tacky('destroy')