PageSourceSearch

https://socpub.com/themes/newsplus/js/custom/fixed-header.js?v=11.4.7

js socpub.com collected 2026-10-02 08:09:53 UTC 1,332 bytes, 40 lines download raw bytes

1  /**
2  * Add Javascript - Fixed Header
3  */
4jQuery(document).ready(function($) {
5  var preHeaderHeight = $("#pre-header").outerHeight() || 0,
6  headerTopHeight = $("#header-top").outerHeight() || 0,
7  headerHeight = $("#header").outerHeight() || 0;
8  $(window).on("load", function (e) {
9    if(($(window).width() > 767)) {
10      $("body").addClass("fixed-header-enabled");
11    } else {
12      $("body").removeClass("fixed-header-enabled");
13    }
14  });
15  $(window).resize(function() {
16    if(($(window).width() > 767)) {
17      $("body").addClass("fixed-header-enabled");
18    } else {
19      $("body").removeClass("fixed-header-enabled");
20    }
21  });
22  $(window).scroll(function() {
23    if(($(this).scrollTop() > preHeaderHeight+headerTopHeight) && ($(window).width() > 767)) {
24      $("body").addClass("onscroll");
25      if ($("#toolbar-administration").length > 0) {
26        var adminHeight = $('body').css('paddingTop');
27        $("#header").css("top", adminHeight);
28      }
29      if ($("#page-intro").length > 0) {
30        $("#page-intro").css("paddingTop", (headerHeight)+"px");
31      } else {
32        $("#page").css("paddingTop", (headerHeight)+"px");
33      }
34    } else {
35      $("body").removeClass("onscroll");
36      $("#header").css("top", (0)+"px");
37      $("#page,#page-intro").css("paddingTop", (0)+"px");
38    }
39  });
40});

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.