Open Ronak1010 opened 6 years ago
jQuery Code:
$(document).ready(function () { var vCourses = '101,1005'; // string 101 = group-1 and 1005 = option of group-2 in HTML Below ... ... });
HTML Code:
<select id="ddlCourses" name="ddlCourses" multiple="multiple" class="multiselect" > <optgroup class="group-1" value="101" label="(Reg)Basic&Ms-Office"> <option value="1001">(Reg)Ms-Word</option> <option value="1002">(Reg)Ms-Excel</option> <option value="1003">(Reg)Ms-PowerPoint</option> <option value="1004">(Reg)Ms-Access</option> </optgroup> <optgroup class="group-2" value="102" label="ExcelCareer"> <option value="1005">(Adv)Ms-Excel</option> <option value="1006">(VBA Macros)Ms-Excel</option> </optgroup> </select>
Question: How to set all options of group-1 (value 101) and option (value 1005) selected... at page load event..? Thank you.
Have you found a solution?
jQuery Code:
HTML Code:
Question: How to set all options of group-1 (value 101) and option (value 1005) selected... at page load event..? Thank you.