Chosen js rocks, now with responsive goodness

6th August 2013
All posts

Chosen.js is now responsive!

Chosen is a jQuery plugin that makes long, unwieldy select boxes much more user-friendly.

I love chosen.js from the folks at Harvest. But I noticed my current installation lacked responsive capability (all widths were static).

So after a little searching I found the releases page and then found this code to add to your javascript file to activate the 100% width (or whatever your preferred width – I hear IE prefers 98% for this width):

$("select").chosen({ width: '100%' }); // width in px, %, em, etc

Do you use Chosen? Do you like it? Let me know in the comments.

Tags:

Nathaniel Flick

I'm a Front End Web Developer passionate about usability. My primary specialties are HTML5, CSS3, SCSS, LESS, and jQuery and I am very familiar with Foundation and Bootstrap frameworks. I've worked on top of and with Rails, Python, and ASP.net/Umbraco back end frameworks.

  • mohammedzamakhan

    Yes I like it, but I test on Tablets, and it does not give the same behaviour as a dropdown behaves in tablets. So I think chosenjs has to support native behaviours of tablets and phones

    • You could probably add the tablet/touch behaviour on your own, plenty of js around for that, aye?

  • yash pgdost

    Thanks, It worked perfectly….

  • David Williams

    Hi, how would I do this in Angular?