Answer the question
In order to leave comments, you need to log in
How to delegate scroll?
I want to hang a common onscroll handler for all elements on the page, how can I do this? Tried like this:
$(document).scroll(function(e){
console.log(e.target);
});
$(document).on("scroll", "*", function(e){
console.log(e.target);
});
$("*").scroll(...);
Answer the question
In order to leave comments, you need to log in
You probably understand that pop-up events are delegated.
And when such misunderstandings happen with hanging events, do you always go to the sources to figure it out?
Bubbles No / Yes
When dispatched on the Document element, this event type MUST bubble to the Window object.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question