Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- window.onscroll = function () {
- var sticky = document.querySelector('nav');
- if (document.body.scrollTop + document.documentElement.scrollTop > 180)
- sticky.className = "sticky";
- else
- sticky.className = "menu";
- };
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement