riklomas / quicksearch

A jQuery plugin for searching through tables, lists, etc quickly
http://www.lomalogue.com/jquery/quicksearch/
680 stars 261 forks source link

Clearsearch Functionality #27

Closed leveille closed 5 years ago

leveille commented 13 years ago

Added ability to define clearSearch selector. This selector can be used to clear an existing search. The selector will not display unless there is 1 or more search characters.

bernte commented 13 years ago

does your code only work with Example 2 ?

i'm using / Example 1 / $('input#id_search').quicksearch('table tbody tr');

and your code doesn't work :(

edit: ok tested it with example 2.. and it works not 100% when i press the X the input will deleted but the table doesn't reset

leveille commented 13 years ago

hey, bernte.

Which browser/version are you using? I've tested in the most recent versions of Chrome, FF, and Opera and it worked fine.

bernte commented 13 years ago

FF 3.6.15 :D oldschool rocks :D

Glench commented 13 years ago

Haven't looked if this works, but if you're using HTML5 and input type="search", many web browsers will add a clear button for you. Of course it's not full-proof (probably not in IE), and I believe doesn't fire the keyUp event which would be important here. Just thought I'd mention it.