PageSourceSearch

https://stick-to.de/js/scrolling-nav.js

js stick-to.de collected 2026-09-24 12:17:07 UTC 917 bytes, 27 lines download raw bytes

1//jQuery to collapse the navbar on scroll
2$(window).scroll(function() {
3    if ($(".navbar").offset().top > 50) {
4        $(".navbar-fixed-top").addClass("top-nav-collapse");
5    } else {
6        $(".navbar-fixed-top").removeClass("top-nav-collapse");
7    }
8});
9
10//jQuery for page scrolling feature - requires jQuery Easing plugin
11$(function() {
12
13    $('a.page-scroll[href*="#"]:not([href="#"])').on('click', function () {
14        if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
15            var target = $(this.hash);
16            target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
17            if (target.length) {
18                $('html, body').animate({
19                    scrollTop: (target.offset().top -80)
20                }, 1500, "easeInOutExpo");
21                return false;
22            }
23        }
24    });
25
26});
27

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.