PageSourceSearch

https://www.breakthru.pk/assets/js/scrolling-nav.js

js breakthru.pk collected 2026-10-09 03:51:32 UTC 956 bytes, 29 lines download raw bytes

1(function($) {
2  "use strict"; // Start of use strict
3
4  // Smooth scrolling using jQuery easing
5  $('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function() {
6    if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
7      var target = $(this.hash);
8      target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
9      if (target.length) {
10        $('html, body').animate({
11          scrollTop: (target.offset().top - 56)
12        }, 1000, "easeInOutExpo");
13        return false;
14      }
15    }
16  });
17
18  // Closes responsive menu when a scroll trigger link is clicked
19  $('.js-scroll-trigger').click(function() {
20    $('.navbar-collapse').collapse('hide');
21  });
22
23  // Activate scrollspy to add active class to navbar items on scroll
24  $('body').scrollspy({
25    target: '#mainNav',
26    offset: 56
27  });
28
29})(jQuery); // End of use strict

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.