mstdmstdd Posted July 26, 2017 Share Posted July 26, 2017 Hello,Please open http://ec2-34-212-140-26.us-west-2.compute.amazonaws.com/admin/product/edit?id=61&debug=9page. 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! Quote Link to comment https://forums.phpfreaks.com/topic/304424-set-width-to-multiselect/ Share on other sites More sharing options...
Solution denno020 Posted July 26, 2017 Solution Share Posted July 26, 2017 (edited) 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 Edited July 26, 2017 by denno020 Quote Link to comment https://forums.phpfreaks.com/topic/304424-set-width-to-multiselect/#findComment-1548936 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.