Wijmo UI for the Web
Markup and Scripting
Wijmo User Guide > Widgets > Dropdown > Markup and Scripting

The HTML markup for a wijDropDown widget looks like this.

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>

You can initialize the widget with the following jQuery script.

Script
Copy Code
<script type="text/javascript">
    requirejs.config({
        baseUrl: "http://cdn.wijmo.com/amd-js/3.20161.90",
            paths: {
                "jquery": "jquery-1.11.1.min",
                "jquery-ui": "jquery-ui-1.11.0.custom.min",
                "jquery.ui": "jquery-ui",
                "jquery.mousewheel": "jquery.mousewheel.min",
                "globalize": "globalize.min"
            }
    });
</script>

<script id="scriptInit" type="text/javascript">
    require(["wijmo.wijdropdown"], function () {
        $(document).ready(function () {
            $("#select1").wijdropdown();
        });
    });
</script>

The markup and script featured here results in the following live widget. Mouse over DropDown to see the animation.

See Also

Reference