diff options
Diffstat (limited to 'theme/javascript/core/search.js')
-rwxr-xr-x | theme/javascript/core/search.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/theme/javascript/core/search.js b/theme/javascript/core/search.js index 38d99a3..f17f746 100755 --- a/theme/javascript/core/search.js +++ b/theme/javascript/core/search.js @@ -67,12 +67,10 @@ define([ e.preventDefault(); toggleSearch(); }); - }; - var prepare = function() { - var $searchInput = $(".book-search input"); - $searchInput.keyup(function(e) { + // Type in search bar + $(document).on("keyup", ".book-search input", function(e) { var key = (e.keyCode ? e.keyCode : e.which); var q = $(this).val(); @@ -89,13 +87,12 @@ define([ _.pluck(results, "path") ); } - }); - } + }) + }; return { init: init, search: search, - toggle: toggleSearch, - prepare: prepare + toggle: toggleSearch }; });
\ No newline at end of file |