I have 3 buttons setup and whenever tab is clicked the 3rd button should be focuses rather than the next one in the row which is the first button. For some reason I can’t get the following code to work. Any ideas as to why it’s not working?
$("#updater").keyup(function(event) {
var keyCode = event.keyCode || event.which;
if(keyCode === 9) {
$("#shareButton").focus();
}
});
Try returning
falseto prevent the default actionalternativly you can also do
event.preventDefault()instead ofreturn false;EDIT:
Ok try changing
keyuptokeydownDEMO