User:Yxtqwf/global.js

/*Imports my global.javascript on PRT for global use********************/ /***********************************************************************/ /***********************************************************************/ /**********************************TOC**********************************/ /***********************************************************************/ /************************************************************************ TABLE OF CONTENTS MAIN CODE /***********************************************************************/ /***********************************************************************/ /*******************************MAIN CODE*******************************/ /***********************************************************************/ /***********************************************************************/ importArticles({   type: "script",    articles: [        "u:pultyrandomtesting:User:Grudgeholderr/global.j",    ] }); /* var didScroll; var lastScrollTop = 0; $(window).scroll(function(event){   didScroll = true; }); setInterval(function {   if (didScroll) {        hasScrolled;        didScroll = false;    } }, 250); function hasScrolled { var st = $(this).scrollTop; if (st > lastScrollTop && st > 55) {	// Scroll Down $("#globalNavigation").removeClass("nav-down").addClass("nav-up"); } else {								// Scroll Up       if(st + $(window).height < $(document).height) { $("#globalNavigation").removeClass("nav-up").addClass("nav-down"); }   }    lastScrollTop = st; } //https://medium.com/@mariusc23/hide-header-on-scroll-down-show-on-scroll-up-67bbaae9a78c //http://jsfiddle.net/s6mLJ/13142