Jump to content

Set width to multiSelect


mstdmstdd

Recommended Posts

  Hello,
Please open http://ec2-34-212-140-26.us-west-2.compute.amazonaws.com/admin/product/edit?id=61&debug=9
page. Login must be visible on login page. Just click “Login”.
Popup dialog with multiSelect is opened with code like:
 

$('#multi_categories_list').multiSelect( {
multiple: false,
header: "Type",
noneSelectedText: "Type",
selectedList: 1,
minWidth:1000,

} );

$("#multi_categories_list").multiSelect('refresh');
$("#multi_categories_list").focus()
$("#multi_categories_list").css('width', '1000px');
$("#multi_categories_list").width(1000);


if ( parseInt(this_debug) == 9 ) {
alert( "INITED::" )
}

I try to set more width in ways I found in google, but failed.
Which is the right way?

Thanks!

Link to comment
Share on other sites

Is there a reason you're using JS to set the width and not CSS?

 

It looks like you're targeting the <select> element, but due to the use of some multi-select plugin, the <select> element is actually hidden and will be updated automatically by the plugins' Javascript when you select one of the multi-select items (which are actually just rendered as <li>'s)

 

Try targeting the element "#ms-multi_categories_list" when setting the width, and you should see things change.

$("#ms-multi_categories_list").css('width', '1000px');

Ideally, however, you would add this width information to your stylesheet

 

Denno

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.