Sha256: 916bac5634ee664d3af39184ad1c7762fa05d654ad62050345698fad50a3b1f1
Contents?: true
Size: 510 Bytes
Versions: 31
Compression:
Stored size: 510 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" tabindex="-1"></a>' ) } } })(jQuery, window.GOVUK.Modules)
Version data entries
31 entries across 31 versions & 1 rubygems