Skip to content
Snippets Groups Projects
Commit ca232546 authored by khawkins98's avatar khawkins98
Browse files

Auto focus on searchbox

parent 3ef43910
No related branches found
No related tags found
No related merge requests found
......@@ -191,7 +191,15 @@ if (jQuery('body').hasClass('google-analytics-loaded')) {
})();
// Focus searchbox on global nav button click
// ---------
// Ideally we would have used Foundation's "data-auto-focus", but this came after the HTML was widely circulated
$('a[data-toggle="search-global-dropdown"]').click( function() {
if($(this).is(':not(.hover)')) { setTimeout(function() { $('input#global-searchbox').focus() }, 100); }
});
// Link overlay images
// ---------
$(function() {
$('.with-overlay').on('click',function(e) {
var href = $(this).find('a:first').attr('href') || '';
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment