I have some window.onscroll
event
$(window).scroll(function(e){
//My Stuff
});
but in my code I call animate scroll to some where
$('html, body').stop().animate({
scrollTop:555
}, 1000);
so how I detect the page was scroll by user or call by my code. My current solution is put a flag before call animate
in my code then clear it but it's not clever solution. I've also read about detect e.which
or e.originalEvent
but it's not work. I think you expert have a good solution here.