How can I trigger a keydown event when a button is clicked?
var e = jQuery.Event("keydown");
e.which = 122; // # Some key code value
$('.button-fullscreen').click(function(){
$(window).trigger(e);
return false;
});
I want to trigger the key F11 on the keyboard when the button is clicked. Is it possible?