I have an input text box and an html table with rows of text.
Table:
- This is the first row of my table.
- This is the second row of my table.
- This is the third row of my table.
When I start typing in the input text box, I want the rows that do not match to disappear.
For example, if I type second row, I would like my table to show only this row:
- This is the
second rowof my table.
If I type this is the, I would like my table to show all 3 matching rows:
This is thefirst row of my table.This is thesecond row of my table.This is thethird row of my table.
If anyone knows of a script to do this, I would appreciate it! (javascript or jquery)
This does what you want, and is pretty lightweight and clean:
http://www.jqueryfun.com/2010/06/14/filtering-through-table-rows-with-few-lines-of-code