Autocomplete with <datalist>Sunday, December 9, 2012·Share·Comments
Recently I've been working on a polyfill for the <datalist> element in browsers that have yet to adopt it. One of the challenges of course has been getting everything to work in IE, such as finding a workaround to IE9's poor oninput event handling. Fortunately after a couple of long nights I've gotten to what I feel is a high quality polyfill. Please feel free to check out the demo below and code / documentation on Github.
- Cross browser compatible (Chrome, Firefox, Safari, Opera, Internet Explorer 7+)
- Framework independent - Works with jQuery, Mootools, etc.
- Works with HTML5's <datalist> element
- Add and remove autocomplete suggestions on the fly
- Accepts an array or XML as input or retrieves from DOM
- Supports dynamic choice populating via Ajax
- Touch friendly
- Open source