riklomas / quicksearch

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

Option to sort elements by count of occurence? #81

Open q2apro opened 6 years ago

q2apro commented 6 years ago

I would like to not only filter the elements but also sort them by the highest number of words found within each element.

Test here (sorting by word count does not work yet): https://www.matheretter.de/w/?s=bruch

Is there an option planned?

Or can someone offer a workaround?

Thanks.

nitriques commented 6 years ago

Hi !

I maintain a version here https://github.com/DeuxHuitHuit/quicksearch

You could be able to do it in the 'onAfter' callback

q2apro commented 6 years ago

I did a workaround:

Copy all results (visible) to a new div. Then sort them by the highlight CSS class (counted).

Not perfect, but works and still performaned.

Thanks.

nitriques commented 6 years ago

:+1: