What can I do to make all options have been already selected when page loaded. I have tried a few times,but failed, thank you so much!
$('#id option').each(function(){
this.selected=true;
});
$('#id').multiselect("refresh");
I used this method finally.
Use the selectAll
method or just generate the select element with pre-selected options.
thanks psyclight! that worked!
$('#id option').each(function(){
this.selected=true;
});
$('#id').multiselect("refresh");
I used this method finally.
this was great it works on me
Most helpful comment
$('#id option').each(function(){
this.selected=true;
});
$('#id').multiselect("refresh");
I used this method finally.