Autogenerate links to header tags from header text
$ npm install --save hanchor
The quickest way to begin using hanchor is to include it in the <head> of your HTML document.
<head>
<script src="https://unpkg.com/hanchor@1.0.7" />
</head><html>
...
<script type="text/javascript">
(function() {
hanchor.init('article');
})();
</script>
...
</html>Type: stringor object, Default: 'body'
The DOM element that header linking is scoped to.
Type: string, Default: '#'
The content of the header tag link.
Type: string or false, Default: false
Class to be assigned to the header tag links.
Type: string, Default: 'beforeend'
Position the link 'beforebegin', 'afterbegin', 'beforeend' or 'afterend' in reference to the the header tag.
MIT © Rodney Dennis