I have a game I made with HTML5, CSS, and JavaScript. I have images of joystick arrows. I would like users to be able to click my joystick arrows and have it work as if the arrows on the keyboard were pressed. I wrote the code like this but it doesn't work:
var $rt_arrow = $('.rt_arrow') $rt_arrow.on('click' , function (e) { e.keyCode == 39 } How do I make keyCode 39 fire when the image of the right arrow is clicked?