mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 10:50:24 +00:00
theme: remove search artifacts #210
This commit is contained in:
parent
b0ded62b1f
commit
ac7a968be1
1 changed files with 1 additions and 16 deletions
|
@ -240,7 +240,7 @@ jQuery(function() {
|
|||
return false;
|
||||
});
|
||||
|
||||
var sidebarStatus = searchStatus = 'open';
|
||||
var sidebarStatus = 'open';
|
||||
ps = new PerfectScrollbar('#sidebar .highlightable');
|
||||
setMenuHeight();
|
||||
|
||||
|
@ -259,20 +259,6 @@ jQuery(function() {
|
|||
location.reload();
|
||||
return false;
|
||||
});
|
||||
jQuery('[data-search-toggle]').on('click', function() {
|
||||
if (sidebarStatus == 'closed') {
|
||||
jQuery('[data-sidebar-toggle]').trigger('click');
|
||||
jQuery(document.body).removeClass('searchbox-hidden');
|
||||
searchStatus = 'open';
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
jQuery(document.body).toggleClass('searchbox-hidden');
|
||||
searchStatus = (jQuery(document.body).hasClass('searchbox-hidden') ? 'closed' : 'open');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
var ajax;
|
||||
jQuery('[data-search-input]').on('input', function() {
|
||||
|
@ -312,7 +298,6 @@ jQuery(function() {
|
|||
|
||||
if (sessionStorage.getItem('search-value')) {
|
||||
var searchValue = sessionStorage.getItem('search-value')
|
||||
$(document.body).removeClass('searchbox-hidden');
|
||||
$('[data-search-input]').val(searchValue);
|
||||
$('[data-search-input]').trigger('input');
|
||||
var searchedElem = $('#body-inner').find(':contains(' + searchValue + ')').get(0);
|
||||
|
|
Loading…
Reference in a new issue