Live data from Hacker News

Select2 - A better way to make select boxes (with jQuery)

github.com

1–10 of 60 posts

Re: Select2 - A better way to make select boxes (with jQuery)

#3

Obligatory: what's the difference between Select2 and Chosen? ( http://news.ycombinator.com/item?id=4074501 )

I was just about to ask this question, but there seems to be some differences: loading of remote data (I believe in chosen you have to hook yourself the ajax part), the infinite scrolling is also a good idea, and the drag & drop sort was missing.

Re: Select2 - A better way to make select boxes (with jQuery)

#5

Obligatory: what's the difference between Select2 and Chosen? ( http://news.ycombinator.com/item?id=4074501 )

I was just about to ask this question, but there seems to be some differences: loading of remote data (I believe in chosen you have to hook yourself the ajax part), the infinite scrolling is also a good idea, and the drag & drop sort was missing.

Looks like it's based on Chosen.

Re: Select2 - A better way to make select boxes (with jQuery)

#6
Maybe it's just me, but I tend to dislike loading 50kb (plus the CSS file) scripts into my applications unless the service is built around something that said script adds a ton of value for.

I dunno, is 50kb relevant any longer? Still seems like the 50kb to 100kb range matters when adding in js files. At 5kb to 10kb I don't think much about it.

Re: Select2 - A better way to make select boxes (with jQuery)

#9
Tangential, but ever since browsers started to implement the behavior: if a select is selected and start typing, it automatically starts matching options, I don't mind them as much. It's a feature for power users and there are definitely cases where it doesn't apply (e.g. you don't know the options), but it's a big usability win.

Also, for what this is doing, I think comparing it to a is wrong. It's so much more powerful and really shines (and is worth 50k of JS) in situations where you couldn't even use a .

Re: Select2 - A better way to make select boxes (with jQuery)

#10

Maybe it's just me, but I tend to dislike loading 50kb (plus the CSS file) scripts into my applications unless the service is built around something that said script adds a ton of value for. I dunno, is 50kb relevant any longer? Still seems like the 50kb to 100kb range matters when adding in js files. At 5kb to 10kb I don't think much about it.

Minified and served compressed it's 8.51k for the JS and CSS together.
Post reply on HN