Question

In one of my web pages, I have the following JQuery:

$(window).bind('mousemove', function(){ ... });

I am finding a strange bug in MSIE 8 only; it seems to work as expected in all other browsers.

The listener simply doesn't apply, and no errors occur.

This seems to be a bug with $(window).on('mousemove', function(){...}) too (note the function here is on and not bind as in the previous example.)

Était-ce utile?

La solution

use $(document) instead of $(window)

There is no great explanation, except IE8 is quirky. ( there is no good reason for microsoft to have quirks, don't expect one )

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top