I have used this script to filter <li>s using a text input:
http://ejohn.org/blog/jquery-livesearch/
...however, I am not sure how to modify it now for my latest
requirement.
I have a page of news stories that are written as an <h2> headline
followed by a story of <p>s or <ul>s or both. I want the user to be
able to search the text of the <h2>s ONLY, and then keep any matching
headline and its story visible while hiding the rest.
And as for the input, 1) How can I start with a value of "Search
Headlines" without having that text affect the filtering and 2) how
can I have the value text appear in light grey but the actual user
input appear in black?
I appreciate any help and explanation.
No comments:
Post a Comment