I have a button that has the onclick event. How can I trigger it with a particular keypress? I'm stumped. ~:(
in the html
<button id="upButt" onclick='library.cmd()'>Up Direction</button>
in the jQuery
$(function() {
var e = $.Event('keypress');
e.which = 68; //UP key
$('#pre').trigger(e);
});