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.)

Was it helpful?

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 )

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top