jquery - bootstrap multiselect(refresh) is not working properly -
i using bootstrap multiselect list box. when user selects options on multiselect shows correctly. there option reset selected options. when user click on reset button, automatically style=display:none adding dropdown button , dropdown list becomes invisible.
this code
$("#button").click(function () { $('option', $('.multiselect')).each(function (element) { $(this).removeattr('selected').prop('selected', false); }); $('.multiselect').multiselect('refresh'); });
other helpful options are:
$('id').multiselect('refresh');- refreshs multiselect based on selected options of select.$('id').multiselect('destroy');- unbinds whole plugin.buildfilter:builds filter.buildselectall: build selct all.checks if select has been created.$('id').multiselect('select', ['1', '2', '4']);- select options of given values.clearselection: clears selected items.$('id').multiselect('deselect', ['1', '2', '4']);- deselects options of given values.$('id').multiselect('selectall', true);- selects enabled & visible options.$('id').multiselect('deselectall', true);- deselects options.$('id').multiselect('rebuild');- rebuild plugin.$('id').multiselect('enable');- enable multiselect.$('id').multiselect('disable');- disable multiselect.hasselectall: checks whether select checkbox present.updateselectall: updates select checkbox based on displayed , selected checkboxes.$('id').multiselect('updatebuttontext');- update button text , title based on selected options.getselected(): selected options.getoptionbyvalue(): gets select option value.$('id').multiselect('dataprovider', options);- provided data used build dropdown.
for more detail visit bootstrap-multiselect
Comments
Post a Comment