Sha256: 67d7146be579bbe0193ffe03cec194a0a2b43974c2137a1bcdde51106470cee9
Contents?: true
Size: 502 Bytes
Versions: 19
Compression:
Stored size: 502 Bytes
Contents
(function($, Modules) { 'use strict'; Modules.AnchoredHeadings = function() { this.start = function($element) { var headings = $element.find('h1, h2, h3, h4, h5, h6'); headings.each(injectAnchor); }; function injectAnchor() { var $this = $(this); $this.addClass('anchored-heading'); $this.prepend( '<a href="#' + $this.attr('id') + '" class="anchored-heading__icon" aria-hidden="true"></a>' ); }; }; })(jQuery, window.GOVUK.Modules);
Version data entries
19 entries across 19 versions & 2 rubygems