I want to implement a scroll function.. So the default of scroll is disabled. And if the user use the scroll button, I want it to be set to the point I want.. How can I implement this function? window.scrollTop is not working.. I tried a lot of different methods but all were not working..
$(window).scroll(function () {
$(body).scrollTop = 3000px;
})
The
scrollTopproperty only accepts an integer (not pixels). Omit thepxand it should be fine.