I've a problem, why this work
$(selector).scroll(function(e) {
console.log("Scrolling");
});
and this not
$(document).on("scroll", selector, function(e) {
console.log("Scrolling");
});
This is selector
var selector = "#schedule td > div.k-scheduler-content, #schedule td > div.k-scheduler-header";
The scroll event by "on" not work... I don't know why... Check this plunker http://plnkr.co/edit/CjfoIPTCqScS1znAwmIs?p=preview
UPDATE
Maybe I found a solution that work:
document.addEventListener(
'scroll',
function(event){
var $elm = $(event.target);
if( $elm.is(selector) ) { // or any other filtering condition
// do some stuff
console.log('scrolling');
} else {
console.log("selector different");
}
},
true // Capture event
);
'
– Nateous Dec 17 '15 at 15:11