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:

  1. $('id').multiselect('refresh'); - refreshs multiselect based on selected options of select.

  2. $('id').multiselect('destroy'); - unbinds whole plugin.

  3. buildfilter :builds filter.

  4. buildselectall : build selct all.checks if select has been created.

  5. $('id').multiselect('select', ['1', '2', '4']); - select options of given values.

  6. clearselection : clears selected items.

  7. $('id').multiselect('deselect', ['1', '2', '4']); - deselects options of given values.

  8. $('id').multiselect('selectall', true); - selects enabled & visible options.

  9. $('id').multiselect('deselectall', true); - deselects options.

  10. $('id').multiselect('rebuild'); - rebuild plugin.

  11. $('id').multiselect('enable'); - enable multiselect.

  12. $('id').multiselect('disable'); - disable multiselect.

  13. hasselectall : checks whether select checkbox present.

  14. updateselectall : updates select checkbox based on displayed , selected checkboxes.

  15. $('id').multiselect('updatebuttontext'); - update button text , title based on selected options.

  16. getselected() : selected options.

  17. getoptionbyvalue() : gets select option value.

  18. $('id').multiselect('dataprovider', options); - provided data used build dropdown.

for more detail visit bootstrap-multiselect


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

jquery - Keeping Kendo Datepicker in min/max range -