{"id":19859063,"url":"https://github.com/mikedevelops/navigator.js","last_synced_at":"2026-03-04T07:04:31.544Z","repository":{"id":144062898,"uuid":"62785556","full_name":"mikedevelops/navigator.js","owner":"mikedevelops","description":"A vanilla front end package to power in-page navigation","archived":false,"fork":false,"pushed_at":"2017-11-24T09:39:26.000Z","size":91,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T23:58:38.399Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikedevelops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-07T07:41:30.000Z","updated_at":"2024-01-15T14:09:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2dd9900-f548-4ae1-a8af-f6d043ec7db5","html_url":"https://github.com/mikedevelops/navigator.js","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/mikedevelops/navigator.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikedevelops%2Fnavigator.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikedevelops%2Fnavigator.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikedevelops%2Fnavigator.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikedevelops%2Fnavigator.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikedevelops","download_url":"https://codeload.github.com/mikedevelops/navigator.js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikedevelops%2Fnavigator.js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30075425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T05:31:57.858Z","status":"ssl_error","status_checked_at":"2026-03-04T05:31:38.462Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-11-12T14:25:31.013Z","updated_at":"2026-03-04T07:04:31.528Z","avatar_url":"https://github.com/mikedevelops.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Navigator.js\n\n*A vanilla front end package to power in-page navigation*\n\n## Introduction\n\nNavigator is a light weight navigation plugin for in-page navigation links. Navigator maps element IDs provided in the plugin configuration to corrosponding anchor links.\n\n## Installation\n\nInstall with NPM using the following command\n\n```\nnpm install mikedevelops/navigator.js#v1.2.1 --save-dev\n```\n\n## Usage\n\nThis is an example initiation using some default and custom options, see **Options** for more information\n\n```javascript\nvar exampleNav = new Navigator({\n    activeClass: 'active',\n    activeElement: 'list__item', // default: false\n    defaultIndex: false, // default: 1\n    offset: 0,\n    pageLinkSelector: '.page-link',\n    throttle: 75,\n    updateState: true\n});\n```\n\n## Example\n\nExample page coming soon...\n\n## Options\n\n```\nactiveElement: false (default)\n```\n\nAny valid HTML Selector,  `.foo, #bar, *[data-active]`. The active element by default will be anchor link with corrorsponding href attribute, if activeClass is set to false.\n\n\n```\nactiveClass: 'active' (default)\n```\n\nClass name applied to the current active navigation element.\n\n\n```\ndefaultIndex: 1 (default)\n```\n\nThe default active item (this is **not** zero indexed,  defaultIndex: 1 = first item). If set to false, first active item will activate once scrolled into view.\n\n\n```\noffset: 0 (default)\n```\n\nActive item offset, this is the amount in pixels an item will activate before it reaches the top of the viewport. Margin \u0026 padding are currently included by default.\n\n\n```\npageLinkSelector: '.page-selector' (default)\n```\n\nPage link selector, this accepts any valid HTML selector to identify which links should be considered part of the Navigator menu.\n\n\n```\nthrottle: 75 (default)\n```\n\nAmount in milliseconds the window scroll event is throttled. The default will update the Navigator's state every 75ms consecutive scroll events are fired. Increasing this amount will improve performance but affect Navigator's accuracy responding to scroll events.\n\n\n```\nupdateState: true (default)\n```\n\nWhen set to true, this will replace the current browser history state using the history API. This will append the current active item's href attribute to the page's URL, this makes for better sharing of Navigator links.\n\n## Callbacks\n\n```\nonActveItem: null (default)\n```\n\nA callback fired once the active item has changed, the active item `HTMLElement` is available as an argument.\n\n```javascript\nvar exampleNav = new Navigator({\n    callbacks: {\n        onActiveItem: function (activeItem) {\n         // your code here...\n        }\n    }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikedevelops%2Fnavigator.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikedevelops%2Fnavigator.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikedevelops%2Fnavigator.js/lists"}