aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/autocomplete.js
diff options
context:
space:
mode:
authorBuildTools <Noah Loomans>2016-12-07 22:56:09 +0100
committerBuildTools <Noah Loomans>2016-12-07 22:56:09 +0100
commitc6aee6e370fe88909d462a2e10e45b72d20196f7 (patch)
treeacf33859b300c4c4790d1e5be28d8348ef426b57 /public/javascripts/autocomplete.js
parentd90745b23fb55a0736b56c045e12de4b1b05786f (diff)
starting refactor
Diffstat (limited to 'public/javascripts/autocomplete.js')
-rw-r--r--public/javascripts/autocomplete.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/public/javascripts/autocomplete.js b/public/javascripts/autocomplete.js
new file mode 100644
index 0000000..7a56e16
--- /dev/null
+++ b/public/javascripts/autocomplete.js
@@ -0,0 +1,15 @@
+const autocomplete = {}
+const self = autocomplete
+
+self._nodes = {
+ input: document.querySelector('input[type="search"]'),
+ autocomplete: document.querySelector('.autocomplete')
+}
+
+self._textUpdate = function () {
+ self._nodes.autocomplete
+}
+
+self._nodes.input.addEventListener('input', self.hide)
+
+module.exports = autocomplete