http://jsfiddle.net/nicktheandroid/ape5U/34/
Type hol into the textbox on the fiddle example. you’ll see that all the LI’s have the class hidden, making them hidden. now if you make what you had in the textbox into the word holy, you’ll see that you all the sudden have 3 matches.
I need it to show all LI’s(categories) if there’s no matches, instead of hiding all of them, ive been trying to figure this out for hours and cannot, when I change one thing it breaks another. grr.
Add a condition at the end of your
if (length > 2)statement, so you have:I tested and works ok. Hope this helps. Cheers