File tree 2 files changed +2
-15
lines changed
2 files changed +2
-15
lines changed Original file line number Diff line number Diff line change 1
1
< div class ="searchbox ">
2
2
< label for ="search-by "> < i class ="fa fa-search "> </ i > </ label >
3
- < input id ="search-by " type ="text " placeholder ="Search ">
3
+ < input data-search-input id ="search-by " type ="text " placeholder ="Search ">
4
4
< span data-search-clear =""> < i class ="fa fa-close "> </ i > </ span >
5
5
</ div >
6
6
< script type ="text/javascript " src ="{{ .Site.BaseURL }}/js/lunr.min.js "> </ script >
Original file line number Diff line number Diff line change @@ -139,20 +139,7 @@ jQuery(document).ready(function() {
139
139
$ ( ".highlightable" ) . unhighlight ( { element : 'mark' } ) . highlight ( value , { element : 'mark' } ) ;
140
140
141
141
if ( ajax && ajax . abort ) ajax . abort ( ) ;
142
- ajax = jQuery . ajax ( {
143
- url : input . data ( 'search-input' ) + ':' + value
144
- } ) . done ( function ( data ) {
145
- if ( data && data . results && data . results . length ) {
146
- items . css ( 'display' , 'none' ) ;
147
- $ ( 'ul.topics' ) . addClass ( 'searched' ) ;
148
- data . results . forEach ( function ( navitem ) {
149
- jQuery ( '[data-nav-id="' + navitem + '"]' ) . css ( 'display' , 'block' ) . addClass ( 'search-match' ) ;
150
- jQuery ( '[data-nav-id="' + navitem + '"]' ) . parents ( 'li' ) . css ( 'display' , 'block' ) ;
151
- } ) ;
152
- }
153
- ;
154
-
155
- } ) ;
142
+
156
143
jQuery ( '[data-search-clear]' ) . on ( 'click' , function ( ) {
157
144
jQuery ( '[data-search-input]' ) . val ( '' ) . trigger ( 'input' ) ;
158
145
sessionStorage . removeItem ( 'search-input' ) ;
You can’t perform that action at this time.
0 commit comments