(function( $ ) { $('.search-submit').on('keydown', function (e) { if ($("this:focus") && (e.shiftKey)) { e.preventDefault(); } if ($("this:focus") && (e.which == 9)) { $('#menu-toggle').focus(); e.preventDefault(); } }); })( jQuery );