valueReturns: string

Gets or sets the value of the DropDown.

Parameters

NameTypeDescription
value {string} The value that needs to be selected.

Examples

Get

    
 <button class="gj-button-md" onclick="alert($dropdown.value())">Get Value</button>
 <hr/>
 <select id="dropdown" width="200">
     <option value="1">One</option>
     <option value="2" selected>Two</option>
     <option value="3">Three</option>
 </select>
 <script>
     var $dropdown = $('#dropdown').dropdown();
 </script>

  

Set

    
 <button class="gj-button-md" onclick="$dropdown.value('3')">Set Value</button>
 <hr/>
 <select id="dropdown" width="200">
     <option value="1">One</option>
     <option value="2" selected>Two</option>
     <option value="3">Three</option>
 </select>
 <script>
     var $dropdown = $('#dropdown').dropdown();
 </script>