Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

keydown event

$
0
0

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.


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>