https://github.com/sapegin/hashnav
Simplest JavaScript hash navigation.
https://github.com/sapegin/hashnav
Last synced: 3 months ago
JSON representation
Simplest JavaScript hash navigation.
- Host: GitHub
- URL: https://github.com/sapegin/hashnav
- Owner: sapegin
- License: mit
- Created: 2013-04-17T14:10:53.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-01-03T14:03:45.000Z (about 11 years ago)
- Last Synced: 2025-02-01T08:03:28.485Z (11 months ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: Changelog.md
- License: License.md
Awesome Lists containing this project
README
# HashNav
Simplest JavaScript hash navigation.
## API
### HashNav.initial(value)
- value {String | undefined}
Get/set default hash. Default hash is a hash that will never visible in URL. It’s a default state of a page.
### HashNav.change(value)
- value {String | Function}
Set/execute change handler. `HashNav.change('foo')` will set page has to `#foo` and execute all handlers added via `HashNav.change(function(hash) { ... })`.
## Example
See `demo.html`.
## Changelog
The changelog can be found in the `Changelog.md` file.
---
## License
The MIT License, see the included `License.md` file.