I need to call a function when a certain letter is pressed, i.e. pressing 'l' changes a div's class, and pressing 'g' changes it to another class.
Can this be done natively in jquery, or will I have to find a plugin?
Thanks.
I need to call a function when a certain letter is pressed, i.e. pressing 'l' changes a div's class, and pressing 'g' changes it to another class.
Can this be done natively in jquery, or will I have to find a plugin?
Thanks.
jQuery:
$(document).bind('keydown', function(e) {
if (e.which == 39) {
rightArrowFunction();
}
});