vdw / HideSeek

A simple, mobile-friendly, yet customizable quick/live search jQuery plugin.
http://vdw.github.io/HideSeek
Apache License 2.0
429 stars 74 forks source link

Callback for initial state #13

Open siamkreative opened 9 years ago

siamkreative commented 9 years ago

Hi @vdw,

In one project, I wanted to show only the first 5 elements of a list. Therefore, the hidden_mode was not suitable and here is what I did: $('#adh-other-lamps>li:not(:lt(5))').hide();.

But when someone searches, and delete the search string, the whole list shows up. Could you please add a callback for when it goes back to initial state (empty input)? Or let me know how I could achieve this? Or perhaps, modify the hidden_mode to allow to specify how many items to show (instead of boolean).

Cheers

siamkreative commented 9 years ago

Forget about the first commit 9e3937a. As it uses my own indentation (tabs), you won't be able to clearly identify the changes I made.

There's still work to be done, but you get the idea...