Wijmo User Guide > Widgets > Dropdown > Markup and Scripting |
The markup used to create a wijdropdown widget should resemble the following:
Sample Markup |
Copy Code
|
---|---|
<select id="select1"> <optgroup label="A-G"> <option>A</option> <option selected="selected">B</option> <option>C</option> <option>D</option> <option>E</option> <option>F</option> <option>G</option> </optgroup> <optgroup label="H-M"> <option>H</option> <option>I</option> <option>J</option> <option>K</option> <option>L</option> <option>M</option> </optgroup> </select> |
The following script initializes the wijdropdown widget:
Sample Script |
Copy Code
|
---|---|
<script id="scriptInit" type="text/javascript"> $(document).ready(function () { $("#select1").wijdropdown(); }); </script> |
The markup example and script featured here results in the following: