PageSourceSearch

https://www.parmley-graham.co.uk/catalog/view/theme/pg-responsive-2023/script/system/helpers.js?v=2026.09.17.2

js parmley-graham.co.uk collected 2026-10-04 17:52:35 UTC 1,853 bytes, 59 lines download raw bytes

1/**
2 * Various small contained methods to help with interaction and animation mechanics.
3 *
4 * @author MattWade
5 */
6
7/**
8 * Fix the mega menu to top when scrolled past.
9 *
10 * @return void
11 */
12if ($('#header-fixed-nav').length) {
13    var fixmeTop = $('#header-fixed-nav').offset().top + 100;       // get initial position of the element
14    var headerOffsetHeight = $('#header-fixed-nav').height();
15}
16
17$(window).scroll(function() {                  // assign scroll event listener
18
19    var currentScroll = $(window).scrollTop(); // get current position
20
21    if (currentScroll >= fixmeTop) {           // apply position: fixed if you
22        $('#header-fixed-nav').css({                      // scroll to that element or below it
23//             position: 'fixed',
24            top: '0',
25            left: '0'
26        });
27    } else {                                   // apply position: static
28        $('#header-fixed-nav').css({                      // if you scroll above it
29//             position: 'static'
30        });
31    }
32
33});
34
35$(document).ready(function() {
36    $('#header-pusher').css({                      // if you scroll above it
37        'margin-top': headerOffsetHeight+'px'
38    });
39    $('#search-panel').css({                      // if you scroll above it
40        'margin-top': headerOffsetHeight+'px'
41    });
42});
43
44$(window).resize(function(){
45    var headerOffsetHeight = $('#header-fixed-nav').height();
46    $('#header-pusher').css({                      // if you scroll above it
47        'margin-top': headerOffsetHeight+'px'
48    });
49    $('#search-panel').css({                      // if you scroll above it
50        'margin-top': headerOffsetHeight+'px'
51    });
52});
53
54function onRecaptcha(response) {
55    console.log(response);
56    // TODO - manually handle captcha response if required
57    //grecaptcha.reset();
58    //return true;
59}

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.