In JQuery 1.6.1, we can supposedly use +=
or -=
with css()
just as we can do with animate()
, but this isn't working. Does anyone see a problem with the code?
$(document).keydown(function(e) {
if (e.which == 37) { //37 left arrow key.
$('div').css('left', '-=10px')
}
});