🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Just another jQuery plugin used to create unique anchor links with SVG based link icons for heading elements (h1, h2, h3, h4, h5, h6) within the document.

anchor

Documentation

jQuery Anchorify Built with Grunt

jQuery Anchorify is a plugin that creates anchors for headings in your website.

Usage

Include jQuery and the file anchorify.min.js in your website:

<script src="//code.jquery.com/jquery-1.12.0.min.js"></script> <script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script> <script src="./anchorify.min.js"></script>

Then run jQuery Anchorify with:

jQuery(window).load(function () {     jQuery('body').anchorify(); });

It will scan the element <body> for headings and will create anchors based on the text of the heading.

Styling

You may have noticed that a S/CSS file is not included in this plugin. That's because there's not much to style. If you're looking to get started check out these rules from the example.html file.

.header-link {   display: inline-block;   margin-left: -20px;   padding-right: 8px;   }  .header-link svg {   visibility: hidden;   }  h1:hover .header-link svg, h2:hover .header-link svg, h3:hover .header-link svg, h4:hover .header-link svg, h5:hover .header-link svg, h6:hover .header-link svg {   visibility: visible; } 

Examples


You May Also Like