0

Scroll event not firing. Using jQUery 1.11.1 . Tried it this way :

$(document).on( 'scroll', '#ulId', function(){
    console.log('Event Fired');
});



$(document).on( 'scroll', '#idOfDivThatContainsULandScroll', function(){
    console.log('Event Fired');
});

I'm also using CSS . Is there any possibility , CSS is blocking this event to ?

This fills $pos:

$(window).bind("scroll", function(e) {
var $pos = $(window).scrollTop()
});

Any idea how I can trigger this event?

mad334
  • 1
  • 1

1 Answers1

1

As @adeneo:

The scroll event doesn't bubble, and can't be delegated.

Use like this:

$(window).on( 'scroll', function(){
    console.log('Event Fired');
});
Bhojendra Rauniyar
  • 83,432
  • 35
  • 168
  • 231