Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using Jquery Ui - setting width on a particular multiselect box

Tags:

css

jquery-ui

I am using Jquery UI like this:

$("#companyType").multiselect({
  multiple: false,
  header: "Type",
  noneSelectedText: "Type",
  selectedList: 1
});
$('.ui-multiselect').css('width', '100px');

What I'd like to do is set the .ui-multiselect for only the #companyType div. Something like this:

 $('#companyType.ui-multiselect').css('width', '100px');

Is there a way to do this? Thank you!

like image 250
mtay Avatar asked Apr 24 '11 20:04

mtay


1 Answers

Try this code with minWidth option. It is the minimum width of the entire widget in pixels. Setting to “auto” will disable, and the default is: 225

$("#companyType").multiselect({
  multiple: false,
  header: "Type",
  noneSelectedText: "Type",
  selectedList: 1
  minWidth:100
});
like image 166
Youssef Avatar answered Sep 21 '22 06:09

Youssef