Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

$(document).scroll is not firing in IE8 only

I have a site running some javascript. In IE8 only, the $(document).scroll is not firing when you scroll with or without the mousewheel. Code snippet below:

$(document).scroll(function () {         //do something on scroll       }); 

Is there a specific reason this function won't fire in IE8? I have searched online with no success.

Thanks for all advice and tips in advance!!!!!

like image 769
MTsrb Avatar asked Sep 23 '11 20:09

MTsrb


1 Answers

Try using window:

  $(window).scroll(function () {     //do something on scroll   }); 
like image 177
Naftali Avatar answered Oct 11 '22 20:10

Naftali