I currently have buttons that have accesskey='whateverKey' I have a jQuery that is ran when the document is ready. I want to be able to disable the alt key and only have it highlight the button instead of submit it. Which can be done if you put in a onClick='if(checkIfAlt())gotoPage' on every single button. is it possible to do that in a .ready? without having every button use the onClick?
I need it ran in this....
jQuery( document ).ready({ } I have tried all of these
jQuery(document).on('button', 'form', function(event) { alert('clicked'); event.preventDefault(); }); jQuery(document).bind("keydown", function(event){ event.preventDefault(); }); $("button").click(function(evt) { if (evt.ctrlKey) alert('Ctrl down'); if (evt.altKey) alert('Alt down'); }); Some of these are out there but I was just trying a bunch of stuff trying to figure out how to get this to work. Is this possible?
Thanks a lot!!