The search is very straightforward: it relies on two well-supported CSS3 selectors (
[attr*=]) and the rewriting of a style rule each time the search input is modified:
indexOf() for search is speed: you only change one element at each keystroke (the
<style> tag) instead of changing all the elements matching the query. Using the
:not() selector, this implementation works on IE9+, but it could easily be made compatible with IE8+ by using two rules instead of one.
Published on 15 May 2013