Adding keyboard support for Search
Updated js/functions.js with following JavaScript.
/** * Key support for search results */ $(document).keydown(function (e) { var searchResultList = $('#jquery-live-search'); var searchResults = searchResultList.find('a'); if (searchResults.length > 0) { var currentFocus = searchResultList.find('a:focus'); var startAt = searchResults.index(currentFocus); switch (e.keyCode) { // Arrow up case 38: e.preventDefault(); if (startAt > 0 || startAt == 0) { searchResults.eq(startAt - 1).focus(); } else { searchResults.last().focus(); } break; // Arrow down case 40: e.preventDefault(); if (searchResults.length != (startAt + 1)) { searchResults.eq(startAt + 1).focus(); } else { searchResults.first().focus(); } break; // Enter case 13: currentFocus.click(); return; // All other key strokes default: var search = $('#s'); search.focus(); search.val(search.val()); break; } } });
Fixing marging on homepage
Fixed margin on homepage by removing class half-gutter in home.php.
// before { echo '<div class="row half-gutter">'; } // after { echo '<div class="row">'; }