how can I check if the user scrolls down? I have a menubar at the top of the page with a logo. And if the user scrolls down I want to resize or change the logo (smaller), change the height of the menu bar and make the position fixed.
Thanks
how can I check if the user scrolls down? I have a menubar at the top of the page with a logo. And if the user scrolls down I want to resize or change the logo (smaller), change the height of the menu bar and make the position fixed.
Thanks
Try this
window.onscroll = function (e) { //when window is scrolled
//change image size and height of menu bar
}