diff globalneighbors/templates/index.html @ 12:6d89ea94930b

add passthrough fileserver for autocomplete
author Jeff Hammel <k0scist@gmail.com>
date Sun, 25 Jun 2017 13:18:13 -0700
parents d1b99c695511
children 94af113e498a
line wrap: on
line diff
--- a/globalneighbors/templates/index.html	Sun Jun 25 12:54:05 2017 -0700
+++ b/globalneighbors/templates/index.html	Sun Jun 25 13:18:13 2017 -0700
@@ -3,18 +3,33 @@
   <head>
     <title>Global Neighbors</title>
     <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
-    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
+    <!-- <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> -->
+    <!-- <script> -->
+    <!--   $( function() { -->
+    <!--   $( "#cities" ).autocomplete({ -->
+    <!--   source: "/cities", -->
+    <!--   autoFocus: true, -->
+    <!--   minLength: 3, -->
+    <!--   delay: 1500 -->
+    <!--   }); -->
+    <!--   }); -->
+    <!-- </script> -->
+    <script src="/js/jquery.easy-autocomplete.min.js"></script>
+    <link rel="stylesheet" type="text/css" href="/css/style.css"/>
+    <link rel="stylesheet" type="text/css" href="/css/easy-autocomplete.css"/>
     <script>
       $( function() {
-      $( "#cities" ).autocomplete({
-      source: "/cities",
-      autoFocus: true,
-      minLength: 3,
-      delay: 1500
-      });
+      var options = {
+      url: "/cities",
+      list: {
+		match: {
+			enabled: true
+		}
+	}
+      };
+      $( "#cities" ).easyAutocomplete(options);
       });
     </script>
-    <link rel="stylesheet" type="text/css" href="/css/style.css"/>
   </head>
   <body>
     <h1>Global Neighbors</h1>