Closed rcass closed 6 years ago
var $searchInput = $('.search-field'); $('.main-navigation .search-field').on('click', function (e) { e.preventDefault(); $searchInput.focus();
$(document).on('keypress', function (event) {
if ($searchInput.val() !== '') {
if (event.which == 13) {
console.log('enter pressed');
$('.search-form').submit();
}
}
});
});
this seems to do the trick!
Looks like it is functioning now 👍
The search in the nav bar does not submit when you hit enter.