daily pastebin goal
24%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var prevScrollpos = window.pageYOffset;
  2.       window.onscroll=function(){scrollevent()};
  3.       function scrollevent()
  4.       {
  5.            var currentScrollPos = window.pageYOffset;
  6.            if (prevScrollpos < currentScrollPos)
  7.            {
  8.                document.getElementById("navbar").className = "navup";
  9.            }
  10.            else
  11.            {
  12.                document.getElementById("navbar").className = "navdown";
  13.            }
  14.            prevScrollpos = currentScrollPos;
  15.       }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top