Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fixing the size of Jquery Ui multiselect

I am using this Jquery Ui multiselect plugin http://quasipartikel.at/multiselect_next/. I am trying to put this multiselect in an html table cell , but the size of multiselect becomes too small . Any help regarding , how to size the the whole multiselect so that it could be shown in a table , would be highly appreciated .

like image 763
user2002522 Avatar asked Jan 14 '23 22:01

user2002522


2 Answers

The Jquery Ui multiselect plugin appears to use the height and width values of the select item you are calling it on.

For example if you have a select like:

<select id="locations" class="multiselect" multiple="multiple" name="locations[]" style="width:300px; height:300px;">

Then call:

$(".multiselect").multiselect();

Your new multiselect will have 300x300 dimensions.

like image 166
Jon McEroy Avatar answered Jan 19 '23 10:01

Jon McEroy


The issue appears to be, multiselect by default has a min height of 200, or some predefined min height setting. To resolve I did this below which worked for me anyhow. Hope it helps someone else.

 $("#ddl_MMS").multiselect({ columns: 1, placeholder: "@Report.ALLMMS", selectAll: true, minHeight:40 });
like image 29
Deathstalker Avatar answered Jan 19 '23 12:01

Deathstalker