I’m having problems hooking up the mousedown event for the window using jQuery in IE8. I’m getting no errors, but the event does not seem to be firing. It does work in IE9 and all other browsers I have tried. Here’s my code:
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function test(e) {
alert('test');
}
$(document).ready(function () {
$(window).mousedown(test);
});
</script>
</head>
<body>
</body>
</html>
use
documentinstead ofwindow