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

有帮助吗?

解决方案

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 )

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top