Sh3ll
OdayForums


Server : LiteSpeed
System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User : claqxcrl ( 523)
PHP Version : 8.1.32
Disable Function : NONE
Directory :  /home/claqxcrl/askdragao.com/wp-content/themes/newsphere/assets/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/claqxcrl/askdragao.com/wp-content/themes/newsphere/assets/fixed-header-script.js
jQuery(document).ready(function($){

    // Here You can type your custom JavaScript...

window.onscroll = function() {myFunction()};

var header = document.getElementById("main-navigation-bar");
var sticky = header.offsetTop;

function myFunction() {
  if (window.pageYOffset > sticky) {
    header.classList.add("aft-sticky-navigation");
  } else {
    header.classList.remove("aft-sticky-navigation");
  }
}

});

jQuery(document).ready(function($){

var didScroll;
var lastScrollTop = 0;
var delta = 5;
var navbarHeight = $('#main-navigation-bar').outerHeight();

$(window).scroll(function(event){
    didScroll = true;
});

setInterval(function() {
    if (didScroll) {
        hasScrolled();
        didScroll = false;
    }
}, 250);

function hasScrolled() {
    var st = $(this).scrollTop();
    
    // Make sure they scroll more than delta
    if(Math.abs(lastScrollTop - st) <= delta)
        return;
    
    // If they scrolled down and are past the navbar, add class .nav-up.
    // This is necessary so you never see what is "behind" the navbar.
    if (st > lastScrollTop && st > navbarHeight){
        // Scroll Down
        $('#main-navigation-bar').removeClass('nav-down').addClass('nav-up');
    } else {
        // Scroll Up
        if(st + $(window).height() < $(document).height()) {
            $('#main-navigation-bar').removeClass('nav-up').addClass('nav-down');
        }
    }
    
    lastScrollTop = st;
}

});

ZeroDay Forums Mini