Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery Chosen.js - how to search in multiple select?

I'm using an jquery plugin called Chosen. I see it has a search option available for single select, does anyone know how I can enable it in a case of using multiple select?

Thanks

like image 591
Ray Avatar asked Aug 26 '12 23:08

Ray


2 Answers

Chosen search works with multiple select. Check examples on their site http://harvesthq.github.com/chosen/

If you are asking, how to use it, here is the example: Html code:

<select multiple class="chzn-select">

Javascript code:

$('.chzn-select').chosen();

And it is done.

like image 125
Samuel Hapak Avatar answered Nov 15 '22 17:11

Samuel Hapak


For others who may be looking for a live demo there is a great fiddle: http://jsfiddle.net/RVH8D/ which shows a simple implementation of chosen and includes images in the results list.

If you want a multiple change

<select...>

to

<select... multiple="true">
like image 1
ter24 Avatar answered Nov 15 '22 17:11

ter24