Detect mousewheel usage but keep the page scrolling (javascript/jquery) -
i need detect mousewheel usage, when add event listener stops whole page scrolling no matter how fiddle it. i've tried using mousewheel plugin brandon no avail. need simple mock-up code:
user has used mousewheel: boolean=true
if boolean==true: execute code, change boolean false until next mousewheel usage.
i'm new don't go overboard it, thanks.
i think need that. bare in mind detect scroll keyboard (down key). if want detect scroll:
$(window).scroll(function () { //scroll );
and if want defer between scroll , down:
var lastscrolltop = 0; $(window).scroll(function () { var st = $(this).scrolltop(); //downscroll if (st > lastscrolltop){ } //upscroll else{ } lastscrolltop = st; );
sorry, answer not looking for. using answer abdul sy, instead on scroll, @ bind mousewheel event - http://www.jquerysdk.com/api/event-mousewheel
Comments
Post a Comment