diff options
-rw-r--r-- | awesomplete.js | 2 | ||||
-rw-r--r-- | index.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/awesomplete.js b/awesomplete.js index 739ca98..51dd5ea 100644 --- a/awesomplete.js +++ b/awesomplete.js @@ -77,7 +77,7 @@ var _ = self.Awesomplete = function (input, o) { this.minChars = +input.getAttribute("data-minchars") || o.minChars || 2; this.maxItems = +input.getAttribute("data-maxitems") || o.maxItems || 10; - this.list = input.getAttribute("data-list") || o.list || []; + this.list = input.hasAttribute("list")? "#" + input.getAttribute("list") : input.getAttribute("data-list") || o.list || []; this.filter = o.filter || _.FILTER_CONTAINS; this.sort = o.sort || _.SORT_BYLENGTH; @@ -27,7 +27,7 @@ <h1>Demo (no JS, minimal options)</h1> <label> Pick a programming language:<br /> - <input autofocus class="awesomplete" data-list="Ada, Java, JavaScript, Brainfuck, LOLCODE, Node.js, Ruby on Rails" xautofocus /> + <input autofocus class="awesomplete" data-list="Ada, Java, JavaScript, Brainfuck, LOLCODE, Node.js, Ruby on Rails" /> </label> <p>Note that by default you need to type <strong>at least 2 characters</strong> for the popup to show up, though that’s <a href="#customize">super easy to customize</a>. With Awesomplete, making something like this can be as simple as:</p> |