diff options
-rw-r--r-- | scripts.js | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -129,10 +129,6 @@ var isCollapsed = false; } - /* Highlight search box text on click */ - $("#searchbox").click(function () { - $(this).select(); - }); /* Typeahead search functionality */ LS.getData(function(data) { @@ -251,8 +247,20 @@ sitesBH.initialize(); + var $searchbox = $("#searchbox"); + + /* Highlight search box text on click */ + $searchbox.click(function () { + $(this).select(); + }); + + // prevent the page reloading + $searchbox.submit(function () { + return false; + }); + /* instantiate the typeahead UI */ - $("#searchbox").typeahead({ + $searchbox.typeahead({ minLength: 1, highlight: true, hint: false |