I'm doing a little jQuery plugin, and i'm confront a problem.
I read all internet without find a pertinent answer...
I have to say i don't want to prevent scroll at all, it's a little more complicated :
I have a system who scroll on the window with the jQuery function scrollTop(int y)
, but it's the same thing with the native javascript scrollTo(int y)
(or scrollBy
, indeed)
When those function are called, they trigger a 'scroll' event. And i don't want those functions to trigger this event, so i want to block it.
jQuery event.preventDefault();
doesn't work, obviously cause it block event action in event handlers function, so i just want this scroll event don't even be trigger.
I will be very thankful for help, cause i haven't any ideas how to do that.