aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts.js18
1 files changed, 13 insertions, 5 deletions
diff --git a/scripts.js b/scripts.js
index 0a9e221..a408c6d 100644
--- a/scripts.js
+++ b/scripts.js
@@ -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