PageSourceSearch

https://www.thehewittfertilitycentre.org.uk/_frontend/js/main/functions/navigation.js

js thehewittfertilitycentre.org.uk collected 2026-10-04 13:27:09 UTC 1,506 bytes, 49 lines download raw bytes

1var initNavigation = function () {
2    // element variables
3
4    var $siteHeader = $('.site_header'),
5        $navigation = $('#mp-menu'),
6        $components = $siteHeader.add($navigation);
7
8    $(window).on('scroll', function () {
9
10        var scrollPos = $(this).scrollTop();
11
12        $components.css("top", scrollPos + 'px');
13    });
14
15    $('#trigger').on('click', function() {
16
17        $('#mp-menu').find('.js-navfirstlevel').attr('tabindex', '0');
18
19        setTimeout(function(){
20            $('#mp-menu').find('.logo').first().focus();
21        }, 500);
22
23    });
24
25    var subnavToggler = $('.js-subnav-toggler');
26
27    subnavToggler.on('click', function() {
28
29        targetLinks = $(this).data('level');
30
31        $(this).parent().siblings('div').find('a[data-target-level=' + targetLinks + '], button[data-target-level=' + targetLinks + ']').attr('tabindex', '0');
32
33        setTimeout(function(){
34            $(this).closest('.mp-level').find('.mp-level').find('.mp-back').focus();
35        }, 500);
36
37    });
38
39    $('.mp-back').on('click', function() {
40        targetLinks = $(this).data('target-level');
41        $(this).attr('tabindex', '-1').siblings().find('a[data-target-level=' + targetLinks + '], button[data-target-level=' + targetLinks + ']').attr('tabindex', '-1');
42    });
43
44    $('.js-navigationclose').on('click', function() {
45        $('#mp-menu').find('a, button').attr('tabindex', '-1');
46        $('body').trigger('click');
47    });
48
49};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.