davidstutz / bootstrap-multiselect

JQuery multiselect plugin based on Twitter Bootstrap.
https://davidstutz.github.io/bootstrap-multiselect/
Other
3.67k stars 1.98k forks source link

Disabling multiselect div using jQuery changes button width #740

Open nfang001 opened 8 years ago

nfang001 commented 8 years ago

In my html, I define the multiselect as:

<div class="col-sm-6" id="multiSelect"> <div id="itemMultiSelect"><select data-bind="multiselect : { buttonWidth: '100%' }, options: options, optionsValue: 'Id', optionsText: 'Name', value: selectedItem, event: { change: selectedItemChanged}, enable: canEdit"></select></div> ... ... </div>

In my js file, I am disabling the select using:

$('#multiSelect').multiselect('disable');

In the rendered view, the button width is reset to fit the selected option instead of 100% as set in the html. How can I make sure the button width does not change?

Thanks!

davidstutz commented 8 years ago

Will try an example, no ad-hoc solution here ...

moghazali commented 6 years ago

Is there any update on this issue as I am facing this too and needs a fix for it?

Aravind-Sainath commented 5 years ago

$('id').unbind();

try to remove the events