datalist: update README and example, remove compat.js - jscancer - Javascript crap (relatively small)
(HTM) git clone git://git.codemadness.org/jscancer
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 392f4d4e2c582f2132e1d162012157a1d1c655fa
(DIR) parent c1e9571c2fd4147beef18ae61f97206f8b9a29eb
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Thu, 2 Jun 2016 18:50:26 +0200
datalist: update README and example, remove compat.js
Diffstat:
M datalist/README | 18 ++++--------------
M datalist/TODO | 3 ---
M datalist/example.html | 10 ++++------
3 files changed, 8 insertions(+), 23 deletions(-)
---
(DIR) diff --git a/datalist/README b/datalist/README
@@ -8,8 +8,8 @@ FEATURES
--------
- Small:
- - Filesize: +- 4.6KB.
- - Lines: +- 164, not much code, so hopefully easy to understand.
+ - Filesize: +- 5.2KB.
+ - Lines: +- 185, not much code, so hopefully easy to understand.
- No dependencies on other libraries like jQuery.
- (Graceful) fallback to HTML5 datalist if Javascript is disabled.
- Filtering values: case-insensitively, tokenized (separated by space).
@@ -18,7 +18,7 @@ FEATURES
- Officially supported browsers are:
- Firefox and Firefox ESR.
- Chrome and most recent webkit-based browsers.
- - IE8+ (use compat.js).
+ - IE10+.
USAGE
@@ -28,17 +28,7 @@ USAGE
EXAMPLES
--------
-See example.html and style.css for an example. A stylesheet file style.css
-is also included.
-
-An input should have the classname "autocomplete" set with the attribute
-list="idoflist". The id should be of the datalist:
-
-<datalist name="nameoflist" id="idoflist">
- <option>Item 1</option>
- <option>Item 2</option>
- <option>Item 3</option>
-</datalist>
+See example.html for an example.
Author
(DIR) diff --git a/datalist/TODO b/datalist/TODO
@@ -1,5 +1,2 @@
-- test oninput clear?
- update examples.
-- when autocomplete is closed RETURN should allow the normal event (for example for form submits).
- prevent default otherwise.
- improve README and documentation.
(DIR) diff --git a/datalist/example.html b/datalist/example.html
@@ -10,25 +10,23 @@
<form method="post" action="">
<label for="os">OS: </label>
-<input type="text" value="" list="list" name="os" id="os" class="datalist" /><br/>
+<input type="text" placeholder="Select OS..." value="" list="list" name="os" id="os" class="datalist" /><br/>
-<!--[if lte IE 9]><select class="datalist" id="list"><![endif]-->
-<!--[if !IE]>--><datalist class="datalist" id="list"><!--<![endif]-->
+<datalist class="datalist" id="list">
<option>DragonflyBSD</option>
<option>GNU/Hurd</option>
<option>GNU/Linux</option>
<option>FreeBSD</option>
<option>MS-DOS 6.11</option>
<option>OpenBSD</option>
+ <option>OpenSolaris</option>
<option>NetBSD</option>
<option>Plan9</option>
<option>Windows</option>
-<!--[if !IE]>--></datalist><!--<![endif]-->
-<!--[if lte IE 9]></select><![endif]-->
+</datalist>
</form>
-<!--[if lte IE 8]><script type="text/javascript" src="../compat.js"></script><![endif]-->
<script type="text/javascript" src="datalist.js"></script>
</body>