jQuery(document).keypress(function(e){
if(e.which == 13){
alert(1);
e.preventDefault();
return false;
}
});
I’ve got the above code. It works in all the major browsers. The problem is, when I open fancybox in Chrome, it stops working till it’s closed. How can I work around this? It does work in all other browsers.
What about
keydowninstead … and movingpreventDefault()higher?