Skip to content
This repository was archived by the owner on Sep 18, 2019. It is now read-only.

Commit 167bf32

Browse files
authored
Update jquery.lunr.search.js
1 parent 7a94204 commit 167bf32

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

js/jquery.lunr.search.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
this.template = this.compileTemplate($(options.template));
3131
this.titleMsg = options.titleMsg;
3232
this.emptyMsg = options.emptyMsg;
33+
this.onAfterResultShow = options.onAfterResultShow;
3334

3435
this.initialize();
3536
}
@@ -107,6 +108,7 @@
107108
});
108109

109110
this.displayResults(results);
111+
this.onAfterResultShow();
110112
}
111113
};
112114

@@ -156,6 +158,7 @@
156158
results : '#search-results', // selector for containing search results element
157159
template : '#search-results-template', // selector for Mustache.js template
158160
titleMsg : '<h1>Search results<h1>', // message attached in front of results
159-
emptyMsg : '<p>Nothing found.</p>' // shown message if search returns no results
161+
emptyMsg : '<p>Nothing found.</p>', // shown message if search returns no results
162+
onAfterResultShow: function() {} // a hook to process the page after the search results have been shown
160163
};
161164
})(jQuery);

0 commit comments

Comments
 (0)