I have the below multiselect checkbox code. When the user visits this page, i need to get the data from the db and populate the checkboxes according to it. I get the data in the forma of an array.
<div data-role="fieldcontain" id="alot">
<fieldset data-role="controlgroup">
<div style="font-weight: bold" id="checkBoxes">Business Units:</div>
<input type="checkbox" value="All" class="checkBoxClass" id="ckbCheckAll" />
<label for="ckbCheckAll">All</label>
<input type="checkbox" value="29" class="checkBoxClass" id="Checkbox1" />
<label for="Checkbox1">XYZ</label>
<input type="checkbox" value="30" class="checkBoxClass" id="Checkbox2" />
<label for="Checkbox2">ABC</label>
</fieldset>
</div>
Below code is not working.
$("#alot").val(array);
$("#alot").checkboxradio("refresh");
array contains values like [29,30]
Am i missing anything ?