File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 99 version = 'master' ;
1010 }
1111 const hitsContainer = '#hits' ;
12+ const statsContainer = '#stats' ;
1213 const paginationContainer = '#pagination' ;
1314 const search = instantsearch ( {
1415 indexName : 'ezplatform' ,
2324 searchFunction ( helper ) {
2425 if ( helper . state . query ) {
2526 helper . search ( ) ;
27+ $ ( statsContainer ) . css ( 'visibility' , 'visible' ) ;
2628 $ ( paginationContainer ) . show ( ) ;
2729 } else {
2830 $ ( hitsContainer ) . empty ( ) ;
31+ $ ( statsContainer ) . css ( 'visibility' , 'hidden' ) ;
2932 $ ( paginationContainer ) . hide ( ) ;
3033 }
3134 } ,
7679 hitsPerPage : 10 ,
7780 } ) ,
7881 instantsearch . widgets . stats ( {
79- container : '#stats' ,
82+ container : statsContainer ,
8083 templates : {
8184 text : `<h1>
8285 Search results ({{#helpers.formatNumber}}{{nbHits}}{{/helpers.formatNumber}})
You can’t perform that action at this time.
0 commit comments