{"id":23317572,"url":"https://github.com/tefra/navgoco","last_synced_at":"2025-04-05T18:08:52.946Z","repository":{"id":9340320,"uuid":"11188760","full_name":"tefra/navgoco","owner":"tefra","description":"Multi-level slide navigation with session storage and accordion effect for JQuery","archived":false,"fork":false,"pushed_at":"2016-11-08T07:34:29.000Z","size":529,"stargazers_count":237,"open_issues_count":15,"forks_count":93,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-03-29T17:11:09.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.komposta.net/article/navgoco","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tefra.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-BSD","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-05T00:17:22.000Z","updated_at":"2024-08-28T00:42:11.000Z","dependencies_parsed_at":"2022-06-29T16:07:58.573Z","dependency_job_id":null,"html_url":"https://github.com/tefra/navgoco","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tefra%2Fnavgoco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tefra%2Fnavgoco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tefra%2Fnavgoco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tefra%2Fnavgoco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tefra","download_url":"https://codeload.github.com/tefra/navgoco/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378149,"owners_count":20929297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-20T16:34:32.769Z","updated_at":"2025-04-05T18:08:52.912Z","avatar_url":"https://github.com/tefra.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![{:navgoco}](https://github.com/tefra/navgoco/raw/master/demo/navgoco.jpg)](http://www.komposta.net/article/navgoco)\n\n\n# {:navgoco} [![Build Status](https://travis-ci.org/tefra/navgoco.png?branch=master)](https://travis-ci.org/tefra/navgoco)\n\nNavgoco is a simple JQuery plugin which turns a nested unordered list of links\ninto a beautiful vertical multi-level slide navigation, with ability to preserve\nexpanded sub-menus between sessions by using cookies and optionally act as an accordion\nmenu.\n\n**[Demo](http://apps.komposta.net/jquery/navgoco/demo)** | **[Homepage](http://www.komposta.net/article/navgoco)**\n\n## Getting Started\nDownload the plugin, unzip it and copy the files to your application directory and load them inside your HTML.\n\n```html\n\u003chead\u003e\n\t\u003c!-- Load JQuery --\u003e\n\t\u003cscript type=\"text/javascript\" src=\"http://code.jquery.com/jquery-latest.min.js\"\u003e\u003c/script\u003e\n\t\u003c!-- Load jquery.cookie plugin (optional) --\u003e\n\t\u003cscript type=\"text/javascript\" src=\"/navgoco/src/jquery.cookie.js\"\u003e\u003c/script\u003e\n\t\u003c!-- Load jquery.navgoco plugin js and css files --\u003e\n\t\u003cscript type=\"text/javascript\" src=\"/navgoco/src/jquery.navgoco.js\"\u003e\u003c/script\u003e\n\t\u003clink rel=\"stylesheet\" href=\"/navgoco/src/jquery.navgoco.css\" type=\"text/css\" media=\"screen\" /\u003e\n\u003c/head\u003e\n```\n\nSample menu html and activation code:\n```html\n\u003cscript type=\"text/javascript\"\u003e\n\t$(document).ready(function() {\n\t\t$('.nav').navgoco();\n\t});\n\u003c/script\u003e\n\u003cul class=\"nav\"\u003e\n\t\u003cli\u003e\u003ca href=\"#\"\u003e1. Menu\u003c/a\u003e\n\t\t\u003cul\u003e\n\t\t\t\u003cli\u003e\u003ca href=\"#\"\u003e1.1 Submenu\u003c/a\u003e\u003c/li\u003e\n\t\t\t\u003cli\u003e\u003ca href=\"#\"\u003e1.2 Submenu\u003c/a\u003e\u003c/li\u003e\n\t\t\t\u003cli\u003e\u003ca href=\"#\"\u003e1.3 Submenu\u003c/a\u003e\u003c/li\u003e\n\t\t\u003c/ul\u003e\n\t\u003c/li\u003e\n\u003c!-- etc... --\u003e\n\u003c/ul\u003e\n```\n\nYou can also extend the default options:\n```html\n\u003cscript type=\"text/javascript\"\u003e\n\t$(document).ready(function() {\n\t\t$('.nav').navgoco({\n\t\t\t  caretHtml: '\u003ci class=\"some-random-icon-class\"\u003e\u003c/i\u003e',\n\t\t\t  accordion: false,\n\t\t\t  openClass: 'open',\n\t\t\t  save: true,\n\t\t\t  cookie: {\n\t\t\t\t  name: 'navgoco',\n\t\t\t\t  expires: false,\n\t\t\t\t  path: '/'\n\t\t\t  },\n\t\t\t  slide: {\n\t\t\t\t  duration: 400,\n\t\t\t\t  easing: 'swing'\n\t\t\t  }\n\t\t  });\n\t});\n\u003c/script\u003e\n```\n\n## Options\n\nYou can pass these options as key/value object during activation to alter the default behaviour.\n\n----------\n\n#### caretHtml\n  * **Type:** `string`\n  * **Default:** ``\n\nRaw html to inserted in the caret markup of the parent links:\n`\u003ca href=\"#link\"\u003eItem\u003cspan\u003e{:caretHtml}\u003c/span\u003e\u003c/a\u003e`\n\n#### accordion\n  * **Type:** `boolean`\n  * **Default:** `false`\n\nEnable accordion mode.\n\n----------\n\n#### openClass:\n  * **Type:** `string`\n  * **Default:** `open`\n\nCSS class to be added in open parent li.\n\n----------\n\n#### save:\n  * **Type:** `boolean`\n  * **Default:** `true`\n\nPreserve expanded sub-menus between session. If jquery.cookie is not included it will be automatically turned off.\n\n----------\n\n#### cookie:\n  * **Type:** `object`\n    * `name`: Cookie name\n      * *Type:* `string`\n      * *Default:* `navgoco`\n    * `expires`: Lifespan in days, `false` makes it a session cookie\n      * *Type:* `integer|false`\n      * *Default:* `false`\n    * `path`: Path where cookie is valid\n      * *Type:* `string`\n      * *Default:* `/`\n\n----------\n\n#### slide:\n  * **Type:** `object`\n    * `duration`: Slide duration in milliseconds\n      * *Type:* `integer`\n      * *Default:* `400`\n    * `easing`:\tSlide easing function (linear|swing) for the transition\n      * *Type:* `string`\n      * *Default:* `swing`\n\n\n## Callbacks\nWith the options you can also pass callback functions to extend the plugin's functionality.\n\n#### onClickBefore:\nThis callback is executed before the plugin's main procedure when clicking links.\n * **Parameters**\n   * `Event`: `Event Object`\n   * `Submenu`: False if the clicked link is a leaf or the next `sub-menu` if link is a branch.\n\n----------\n\n#### onClickAfter:\nThis callback is executed after the plugin's main procedure when clicking links.\n * **Parameters**\n   * `Event`: `Event Object`\n   * `Submenu`: `False` if the clicked link is a leaf or the next `sub-menu` if link is a branch.\n\n----------\n\n#### onToggleBefore:\nThis callback is executed before the plugin's main procedure when toggling sub-menus.\n * **Parameters**\n   * `Submenu`: `JQuery Object`\n   * `Opening`: `True|False` the submenu is opening or closing\n\n----------\n\n#### onToggleAfter:\nThis callback is executed after the plugin's main procedure when toggling sub-menus.\n * **Parameters**\n   * *Submenu:* `JQuery Object`\n   * *Opened:* `True|False` the submenu opened or closed\n\n## Public Methods\n\n#### toggle\nManually open or close sub-menus.\n\n  * Parameters:\n    * `boolean`: Show or hide\n    * `Variable list of indexes`: If omitted toggles **all sub-menus**\n      *  `integer`\n      *  `...`\n      *  `integer`\n\n```js\n// Show|Hide all sub-menus\n$(selector).navgoco('toggle', true|false);\n```\n\n```js\n// Show|Hide sub-menus with specific indexes\n// It will also open parent sub-menus since v0.1.2\n$(selector).navgoco('toggle', true|false, 1, 2, ...);\n```\n\n----------\n\n#### destroy\nDestroy instances and unbind events.\n\n```js\n// I can't think of any other use except for testing...\n$(selector).navgoco('destroy');\n```\n\n## Contributing\n\n#### Code style\nRegarding code style like indentation and whitespace, **follow the conventions you see used in the source already.**\n\n#### Modifying the code\nFirst, ensure that you have the latest [Node.js](http://nodejs.org/) and [npm](http://npmjs.org/) installed.\n\nTest that Grunt's CLI is installed by running `grunt --version`.  If the command isn't found, run `npm install -g grunt-cli`.  For more information about installing Grunt, see the [getting started guide](http://gruntjs.com/getting-started).\n\n1. Fork and clone the repo.\n1. Run `npm install` to install all dependencies (including Grunt).\n1. Run `grunt` to grunt this project.\n\nAssuming that you don't see any red, you're ready to go. Just be sure to run `grunt` after making any changes, to ensure that nothing is broken.\n\n#### Submitting pull requests\n\n1. Create a new branch, please don't work in your `master` branch directly.\n1. Add failing tests for the change you want to make. Run `grunt` to see the tests fail.\n1. Fix stuff.\n1. Run `grunt` to see if the tests pass. Repeat steps 2-4 until done.\n1. Open `test/*.html` unit test file(s) in actual browser to ensure tests pass everywhere.\n1. Update the documentation to reflect any changes.\n1. Push to your fork and submit a pull request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftefra%2Fnavgoco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftefra%2Fnavgoco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftefra%2Fnavgoco/lists"}