Chosen and Select2 are the two more popular libraries for extending selectboxes.
Both seem to be actively maintained, Chosen is older and supports both jQuery and Pr
Select2 supports mobile, whereas Chosen specifically disables itself on iPods, iPhones and mobile Android. If you want to use "extended" select boxes on mobile, this makes your choice easy.
Select2 supports AJAX Chosen Doesn't
Select 2 is little heavier in size compare to chosen.
I switched to Select2 because no official support for ajax operations.
Some differences I've found working with these two plugins:
With select2 you can search at any location in the option. For e.g. if you have an option called ABCDEFG and you type in CDE you will get that option in the search results but with chosen you have to type AB.. and so on to get the results.
I've found that with larger datasets, chosen seems to be faster than select2, especially in IE.
First, Let me tell you that Chosen and Select2 are two great plugin and this is my personal experience about Chosen. All what they are saying is true concerning Chosen.
The issue pointed by Pēteris Caune with the select
is 2 years old and still there is no official fix.
There is simply no good documentation for the API. It has been pointed out (watch issue 671) many time but there is still nothing.
It took them almost 2 years to solve this issue where chosen would basically not work if you hid the div with overflow:hidden
before showing it (and you have to use a witdh:X%
option that you would basically never know if you don't look for the issue).
I'd say that the main problem is the fix speed like said DelvarWorld in issue 92:
My pull request fixes this issue, but like my other one and many of the ones for chosen they are being ignored. This project has too many contributors with too small of a code base.
I first picked Chosen for its MIT licence but I had all theses issues (dropdown cut, not finding the API, looking for hours for the overflow hidden), so I decided to switch to select2 because it has a better documentation, no dropdown cut bug and faster fixes.
IMHO Chosen is "maintained" but not "actively maintained". 341 issues and 51 pull requests for Chosen. Select2 has 128 issues and 25 pull requests. I think the pattern for these is basically
Whichever one you pick, if your use case is exactly in their sweet spot, either one will work. If not, you'll eventually have to write your own or heavily customize these. In either case, the choice of which one specifically isn't all that important. I guess I'll side with @Andy Ray and @paul here that Select2 is probably the better initial choice.