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.
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?
Thanks, It worked perfectly….
Hi, how would I do this in Angular?
I found an example here which integrates Chosen with Angular, and it looks responsive out of the box: http://adityasharat.github.io/angular-chosen/
I like chosen but I need it to work properly on mobile devices. Any sugestion?