PageSourceSearch

https://gardeningserviceshampstead.co.uk/assets/js/script.js

js gardeningserviceshampstead.co.uk collected 2026-10-07 05:46:06 UTC 1,872 bytes, 71 lines download raw bytes

1$(document).ready(function () {
2  // header-fix
3  $(window).on('scroll', function (event) {
4    headerAffix();
5  });
6
7  function headerAffix() {
8    var scrollValue = $(window).scrollTop();
9    if (scrollValue > $('.header').height()) {
10      $('.header').addClass('fixed-top');
11    } else {
12      $('.header').removeClass('fixed-top');
13    }
14  }
15  headerAffix();
16  
17  //Mobile sidebar
18  function navSidebar() {
19    var $sideElement = $('#navbarSupportedContent');
20    var $sideParent = $('header');
21    var $swiper = $('.wrapper');
22    var $body = $('body');
23    $sideElement.on('hidden.bs.collapse', function () {
24      $sideParent.find('.sidebar-overlay').remove();
25      $body.removeClass('scroll-hide');
26    });
27    $sideElement.on('show.bs.collapse', function () {
28      $sideParent.append('<div class="sidebar-overlay" />');
29      $body.addClass('scroll-hide');
30    });
31    $sideParent.on("click", ".sidebar-overlay", function () {
32      $sideElement.collapse('hide');
33    });
34  }
35  navSidebar();
36});
37
38
39// Main content margin top
40
41$(document).ready(function () {
42  // Function to update margin-top based on header height
43  function updateMarginTop() {
44    var headerHeight = $('.header-inner').outerHeight();
45    $('.content-main').css('margin-top', headerHeight + 'px');
46  }
47
48  // Initial update on document ready
49  updateMarginTop();
50
51  // Update on window resize
52  $(window).on('resize', function () {
53    updateMarginTop();
54  });
55
56  // Update on window load (in case images affect layout)
57  $(window).on('load', function () {
58    updateMarginTop();
59  });
60
61  // Update on window scroll (if necessary)
62  $(window).on('scroll', function () {});
63
64
65  // // Initialize intl-tel-input
66  // $("#mobile_code").intlTelInput({
67  //   initialCountry: "gb",
68  //   separateDialCode: true,
69  // });
70});
71

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.