Firebug 1.5.4 JavaScript warning : The 'charCode' property of akeyup
event should not be used. The value is meaningless. To ignore it? Is there any issue?
The warning appears to jQuery 1.4.2 keyup
andkeydown
, not onkeypress
.
I have read that on changingevent.keyCode
andevent.charCode
toevent.which
must fix it, but it does not work for me.
Full code example in http://jsfiddle.net/zTevK/2/ and in question
My code useskeyup
and does not work withkeypress
.
$(document).bind('keyup', function(e){
var key = e.which;
if (key > 36 && key < 41) {
if (key == 37) { changeTab(-1); }
if (key == 38) { changeTab(-imgPerRow); }
if (key == 39) { changeTab(+1); }
if (key == 40) { changeTab(+imgPerRow); }
e.preventDefault();
...