Jquery Ui multiselect size fixing

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 multiselect size multiselect getting too small. Any help regarding how to size the entire multiselect so that it can be shown in the table would be much appreciated.

+4
source share
2 answers

The Jquery Ui multiselect plugin apparently uses the height and width values โ€‹โ€‹of the select element you are invoking.

For example, if you have a choice:

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

Then call:

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

Your new multiselke will have dimensions of 300x300.

+6
source

The problem is that, by default, multi-selection has a minimum height of 200 or some predefined minimum height setting. To solve this, I did it below, which worked for me anyway. Hope this helps someone else.

  $("#ddl_MMS").multiselect({ columns: 1, placeholder: "@Report.ALLMMS", selectAll: true, minHeight:40 }); 
+1
source

Source: https://habr.com/ru/post/1469478/


All Articles