AnchorJS
A JavaScript utility for adding deep anchor links (like these) to existing page content. AnchorJS is lightweight, accessible, and has no dependencies.
See Live Examples in the Documentation.
Installation
Download AnchorJS using npm,
npm install anchor-js
or bower:
bower install anchor-js --save-dev
(or just download it from github).
Then include the anchor.js file (or anchor.min.js) in your webpage.
<script src="anchor.js"></script>
You could also include it via a CDN like CDNJS or jsDelivr.
Usage
See the Documentation for detailed instructions.
Compatibility
Currently Supports: IE9+ and modern browsers
Contributing
To contribute:
- Fork/Clone the repo.
- Make your changes.
- Write tests as needed.
- Run tests locally to confirm everything is working:
- Install phantomjs:
brew install phantomjs
- Install test modules: Run
npm install
- Run all tests:
npm test
- Install phantomjs:
- Minify the code:
npm run release
- Submit a Pull Request.
License
Licensed with the MIT License.