I\'m trying to make it so when a user is in a text box and they press enter, it is the same as clicking the link, in which case it should take them to another page. Here\'s what
Check this out: jQuery Event Keypress: Which key was pressed?
I'll just consolidate the codes from that post here:
$('#searchbox input').bind('keypress', function(e) {
var code = e.keyCode || e.which;
if(code == 13) { //Enter keycode
//Do your stuff + form submit
}
});
PS: I have never tested it, but it 'should' work. :P