I want to check if scroll event was bound to window element in jQuery. Basically I want to see if someone has done something like this:
$(window).scroll(function() { ... });
After looking for a little bit on Stack Overflow, I have found more common question like if event already exist on an element with a working solution.
But when I tried to use $.data( $(window).get(0), 'events' )
I get undefined
. Similar solution is proposed here as well.
So what is the correct way to check for scroll event?