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.
Download AnchorJS using npm,
npm install anchor-js
…and then include it into your project:
import AnchorJS from 'anchor-js';
const anchors = new AnchorJS();
anchors.add();
You could also include it in your webpage via a CDN like CDNJS or jsDelivr.
<script src="https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js"></script>
<script>
anchors.add();
</script>
See the Documentation for detailed instructions.
Currently Supports: IE9+ and modern browsers
To contribute:
npm ci
npm test
npm run build
Licensed with the MIT License.