3

Is there any reason the following shouldn't work in any version of IE?

$(".scroll").mouseover( function () {
   $('body').animate({ scrollTop: $(document).height() }, 10000);
});

$(".scroll").mouseout( function () {
   $('body').stop()
});

I've tested in 8-10 to no avail, but It's working perfectly in Chrome, Firefox, Safari. I tried wrapping the contents in a div and animating that instead of <body> but still no luck - nothing happens at all.

Filburt
  • 17,626
  • 12
  • 64
  • 115
user1851361
  • 107
  • 2
  • 9

3 Answers3

1

Try using mouseenter() and mouseleave() instead..

Here's why - Jquery mouseenter() vs mouseover()

Community
  • 1
  • 1
Bryan Elliott
  • 4,055
  • 2
  • 21
  • 22
1

Try to set body and html as selector, some browsers have an issue if you use body only.

schnawel007
  • 3,982
  • 3
  • 19
  • 27
1

My guess is that you're either using jQuery version 2.x which dropped support for older IE browsers, or you're using an old version of jQuery 1.x. Try upgrading to the latest version of 1.x (1.10.2 right now). The jQuery download page explains more about the differences between the versions and has links to the minified JS files you can link directly hosted by MaxCDN.

Tom
  • 4,422
  • 3
  • 24
  • 36