mrkeck Sharing the Love

6Jan/140

Select2 Width not listening to CSS

When the select2 doesn't change with the css, use $('select').select2({width:'resolve'});
resolve tells it use the css and if there isn't any then guess using javascript.
http://ivaynberg.github.io/select2/#documentation


Ex.

<style>
select{
width: 500px;
}
</style>
<select>
<option>Some Option</option>
</select>
<script>
$('document').ready(function(){
	$('select').select2({width:'resolve'});
});
</script>
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.