Only focus search if search button clicked.
This commit is contained in:
parent
e340b7010c
commit
cdc05ffafd
1 changed files with 6 additions and 4 deletions
|
@ -101,10 +101,12 @@ $(document).ready(function() {
|
|||
}
|
||||
}).filter(':checked').trigger('change', 0);
|
||||
|
||||
function toggleMenu(event) {
|
||||
// Open mobile/search menu.
|
||||
$('#menu-icon').on('click', function(event) {
|
||||
$('#navbar').toggleClass('mobile');
|
||||
});
|
||||
$('#search-icon').on('click', function(event) {
|
||||
$('#navbar').toggleClass('mobile');
|
||||
$('#search-query').focus();
|
||||
}
|
||||
$('#menu-icon').on('click', toggleMenu);
|
||||
$('#search-icon').on('click', toggleMenu);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue