{"_id":"okaynav","_rev":"5-8004a28371fd00336b6c2cac8711fdce","name":"okaynav","description":"Progressively responsive jQuery navigation","dist-tags":{"latest":"2.0.2"},"versions":{"1.0.2":{"name":"okaynav","version":"1.0.2","description":"Progressively responsive jQuery navigation","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/VPenkov/okayNav.git"},"keywords":["responsive","navigation","jquery-plugin","ecosystem:jquery"],"author":{"name":"Vergil Penkov","url":"http://vergilpenkov.com/"},"license":"MIT","bugs":{"url":"https://github.com/VPenkov/okayNav/issues"},"homepage":"https://github.com/VPenkov/okayNav#readme","devDependencies":{"bower":"^1.7.7","browser-sync":"^2.11.1","del":"^2.2.0","gulp":"^3.9.1","gulp-autoprefixer":"^3.1.0","gulp-less":"^3.0.5","gulp-uglify":"^1.5.3","gulp-useref":"^3.0.6"},"dependencies":{"jquery":">=1.7"},"gitHead":"8eadcba46c333b9241fa0ba80982fa62c36d46dd","_id":"okaynav@1.0.2","_shasum":"fdb07d2f6f5e5636744fdb371240b10564153c59","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.1","_npmUser":{"name":"vpenkov","email":"hi@vergilpenkov.com"},"dist":{"shasum":"fdb07d2f6f5e5636744fdb371240b10564153c59","tarball":"https://registry.npmjs.org/okaynav/-/okaynav-1.0.2.tgz","integrity":"sha512-nY+0nni7Dy9XRjQ/LeHpFu+fPfSwj5OK7xu9sPG7+bAAM8Iq8wS2PZzJg+MbfH2NWUBo+4kBmQqyLpCHEzDnOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJMm0kONZLE7Tm0PMr9Cb/I9Dk4FzXxFz0sqJa3r3f8gIgSoCrk88eOOXZTgErkRzaowMu/WvNQIju95cqSJsUOOM="}]},"maintainers":[{"name":"vpenkov","email":"hi@vergilpenkov.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/okaynav-1.0.2.tgz_1458055823390_0.6073041514027864"}},"2.0.2":{"name":"okaynav","version":"2.0.2","description":"Progressively responsive jQuery navigation","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/VPenkov/okayNav.git"},"keywords":["responsive","navigation","jquery-plugin","ecosystem:jquery"],"author":{"name":"Vergil Penkov","url":"http://vergilpenkov.com/"},"license":"MIT","bugs":{"url":"https://github.com/VPenkov/okayNav/issues"},"homepage":"https://github.com/VPenkov/okayNav#readme","devDependencies":{"bower":"^1.7.7","browser-sync":"^2.11.1","del":"^2.2.0","gulp":"^3.9.1","gulp-autoprefixer":"^3.1.0","gulp-less":"^3.0.5","gulp-uglify":"^1.5.3","gulp-useref":"^3.0.6"},"dependencies":{"jquery":">=1.7"},"gitHead":"8eadcba46c333b9241fa0ba80982fa62c36d46dd","_id":"okaynav@2.0.2","_shasum":"6dbb3a15efc279b7b6124e2eaef2d67d2bed6558","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.1","_npmUser":{"name":"vpenkov","email":"hi@vergilpenkov.com"},"dist":{"shasum":"6dbb3a15efc279b7b6124e2eaef2d67d2bed6558","tarball":"https://registry.npmjs.org/okaynav/-/okaynav-2.0.2.tgz","integrity":"sha512-MDzEFfKfy/pOWiWuYZNEDkRCIiLAO1rqkM+COdIRx6DuVljoC7QODEk/bY0sdPRqlwJ50oXRvckYwSvF0W3zdg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMSnM8qsROmxm9LbKBnKjcUooMvEqiLLqB5x0TlNsvWAIgXZgtjTxxxY7HsWYcjwL2sTWMcm67H1LaaDBQYa3Qp6E="}]},"maintainers":[{"name":"vpenkov","email":"hi@vergilpenkov.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/okaynav-2.0.2.tgz_1458055844590_0.10837661381810904"}}},"readme":"#okayNav jQuery Plugin\r\n\r\n[![Join the chat at https://gitter.im/VPenkov/okayNav](https://badges.gitter.im/VPenkov/okayNav.svg)](https://gitter.im/VPenkov/okayNav?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)  \r\n\r\n\r\nYou know how navigations have only a desktop and a mobile state, right? I thought, \"this might cost people money because it requires additional click for users to reach even the most important pages.\"\r\n\r\nThis navigation aims at progressively collapsing navigation links into an off-screen navigation instead of doing it for all the links at the same time. Check out this example:\r\n\r\n![okayNav Demo](https://raw.githubusercontent.com/VPenkov/okayNav/master/demo.gif)\r\n\r\nOr play with it on [CodePen](http://codepen.io/VPenkov/pen/wMZBOg).\r\n\r\n## How to Use\r\nThis is the code used in the example:\r\n```html\r\n<header id=\"header\">\r\n    <a class=\"site-logo\" href=\"#\">\r\n       Logo\r\n    </a>\r\n    \r\n    <nav role=\"navigation\" id=\"nav-main\" class=\"okayNav\">\r\n        <ul>\r\n            <li><a href=\"#\">Home</a></li>\r\n            <li><a href=\"#\">Shop</a></li>\r\n            <li><a href=\"#\">Blog</a></li>\r\n            <li><a href=\"#\">Services</a></li>\r\n            <li><a href=\"#\">Contacts</a></li>\r\n            <li><a href=\"#\">About us</a></li>\r\n            <li><a href=\"#\">Testimonials</a></li>\r\n        </ul>\r\n    </nav>\r\n</header><!-- /header -->\r\n```\r\nInclude the CSS:\r\n```html\r\n<link rel=\"stylesheet\" href=\"css/okayNav.css\" media=\"screen\">\r\n```\r\nInclude the library:\r\n```html\r\n<script src=\"js/jquery.okayNav.min.js\"></script>\r\n```\r\n\r\nAnd here's the JS to initialize it:\r\n```javascript\r\nvar navigation = $('#nav-main').okayNav();\r\n```\r\n\r\n## Dependencies\r\nokayNav depends on jQuery. Tested with jQuery 1.10+ but should work with lower versions.\r\nThe stylization of okayNav comes in a commented LESS and CSS.\r\n\r\n## Browser Support\r\nokayNav supports IE9+, Firefox, Chrome. Transitions work in IE10+.\r\n\r\n## Default options\r\n```javascript\r\nvar navigation = $('#nav-main').okayNav({\r\n\tparent : '', // will call nav's parent() by default\r\n    toggle_icon_class : 'okayNav__menu-toggle',\r\n    toggle_icon_content: '<span /><span /><span />',\r\n    align_right: true, // If false, the menu and the kebab icon will be on the left\r\n    swipe_enabled: true, // If true, you'll be able to swipe left/right to open the navigation\r\n    threshold: 50, // Nav will auto open/close if swiped >= this many percent\r\n    beforeOpen : function() {}, // Will trigger before the nav gets opened\r\n    afterOpen : function() {}, // Will trigger after the nav gets opened\r\n    beforeClose : function() {}, // Will trigger before the nav gets closed\r\n    afterClose : function() {}, // Will trigger after the nav gets closed\r\n    itemHidden: function() {}, // Will trigger after an item moves to the hidden navigation\r\n    itemDisplayed: function() {} // Will trigger after an item moves to the visible navigation\r\n});\r\n```\r\n\r\n## Methods\r\nOpen the off-screen part: ``navigation.okayNav('openInvisibleNav');``\r\n\r\nClose the off-screen part``navigation.okayNav('closeInvisibleNav');``\r\n\r\nToggle the off-screen part``navigation.okayNav('toggleInvisibleNav');``\r\n\r\nRecalculate what should be visible and what shouldn't: ``navigation.okayNav('recalcNav');``\r\n\r\nGet the nav's parent element: ``navigation.okayNav('getParent');``\r\n\r\nGet the nav's visible part: ``navigation.okayNav('getVisibleNav');``\r\n\r\nGet the nav's off-screen part: ``navigation.okayNav('getInvisibleNav');``\r\n\r\nGet the nav's toggle icon: ``navigation.okayNav('getNavToggleIcon');``\r\n\r\nGet the nav children's total width: ``navigation.okayNav('getChildrenWidth');``\r\n\r\nDestroy the nav, make everything visible, disable all events: ``navigation.okayNav('destroy');``\r\n\r\n## Roadmap\r\nThe following features will be implemented at the next versions:\r\n- AMD/CommonJS support\r\n- Multi-level navigation\r\n- Option to prioritize certain nav items\r\n- Option to hide or show all nav items instead of doing it progressively\r\n\r\nPull requests are appreciated.\r\n\r\n## License\r\nLicensed under the [MIT License](https://opensource.org/licenses/MIT).\r\n\r\n## Support\r\nPlease use the GitHub issues for support requests. If you need someone to implement okayNav for you, hit me up at [vergil@moongrab.com](vergil@moongrab.com).\r\n\r\n## Changelog\r\n**2.0.2**  \r\nReintroduced throttling on window resize.\r\n\r\n**2.0.1**  \r\n- Flexbox is now optional; nav will work with floats too;\r\n- Resolved a bug when maximizing the browser.\r\n\r\n**2.0.0**  \r\n- Swipe actions are now available;\r\n- Swipe can be enabled or disabled;\r\n- You can adjust the threshold after which the swipe action will trigger;\r\n- Added extra callbacks;\r\n- Callbacks are now camelCased;\r\n- The beforeOpen/beforeClose callbacks now only trigger if swipe is disabled (for obvious reasons).\r\n\r\n[Scroll up](#default-options) to see the defaults for more information!\r\n\r\n**1.0.2**  \r\nResize events are now a lot more efficient  \r\n  \r\n**1.0.1**  \r\nFirst public version\r\n  \r\n## Tell me what you've created\r\nPing me on [Facebook](http://fb.com/vergil.penkov) or [Twitter](http://twitter.com/vergilpenkov). I'd definitely love to see what you've done with okayNav!\r\n  \r\n## Contributors\r\nMany thanks to [@Bloodb0ne](https://github.com/bloodb0ne) for the enormous help with swipe actions!\r\n  \r\n## Buy me a beer\r\nI appreciate good beer and good coffee. If you find this plugin useful and want to say thanks, there's no better way to do it. My PayPal is available below.  \r\n  \r\n[![Donate! :3](https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9CVK8L6CKVY2Y)\r\n","maintainers":[{"name":"vpenkov","email":"hi@vergilpenkov.com"}],"time":{"modified":"2022-06-22T20:14:20.062Z","created":"2016-03-15T15:30:26.924Z","1.0.2":"2016-03-15T15:30:26.924Z","2.0.2":"2016-03-15T15:30:47.755Z"},"homepage":"https://github.com/VPenkov/okayNav#readme","keywords":["responsive","navigation","jquery-plugin","ecosystem:jquery"],"repository":{"type":"git","url":"git+https://github.com/VPenkov/okayNav.git"},"author":{"name":"Vergil Penkov","url":"http://vergilpenkov.com/"},"bugs":{"url":"https://github.com/VPenkov/okayNav/issues"},"license":"MIT","readmeFilename":"README.md","users":{"filipve":true}}