I have a window.onscroll
event
$(window).scroll(function(e){
but in my code I call an animated scroll to some line where
$('html, body').stop().animate({ scrollTop:555 }, 1000);
since I found that the page was scrolling by the user or calling my code. My current solution is flagged before calling animate
in my code, then clear it, but this is not a smart solution. I also read about the detection of e.which
or e.originalEvent
, but it does not work. I think your expert has a good solution here.
javascript jquery
Trinh Hoang Nhu Jun 15 '12 at 10:52 2012-06-15 10:52
source share