I want use the keydown event and I used this syntax which works fine:
$(document).on("keydown", function(e){
if (e.which == 32) {
alert("something");
}
})
But I wonder why this syntax does not work:
$("#Stage").on("keydown", function(e){
if (e.which == 32) {
alert("something");
}
})
Thanks.