Quicktip: Internet explorer does not trigger key events on the window object

In one of my latest projects I had to use jquery keypress events for next and previous navigation. I develop on safari and do the cross browsertesting afterwards, and it didn’t work in Internet Explorer…

so instead of listening to the window for keypress events:

$(window).keypress(function(){...});

I had to do this:

$(document).keypress(function(){...});

About joggink

I'm a freelance frontend developer and a proud member of the dutch fronteers.

12. August 2010 by joggink
Categories: Uncategorized | Tags: , , , , | Leave a comment

Leave a Reply

Required fields are marked *

*