We create slide shows in HTML / CSS / JS, but for some reason it does not work in Firefox. It works in Webkit browsers without problems.
The code looks like this:
keyPress : function() { $( document.body ).keydown(function(e) { if ( e.keyCode === 37 || e.keyCode === 39 || e.which == 37 || e.which === 39) { e.preventDefault(); ( e.keyCode === 39 || e.which === 39 ) ? Slides.next() : Slides.prev(); } }); },
If I use only $( document ) instead of ( document.body ) , it changes my colors, but the slides do not change.
For some reason, Firefox (7.0.1, OSX Lion) does not receive keystrokes. It works in Safari / Chrome without any problems.
The site we are testing on is: #took link
source share