dev-master
9999999-dev https://github.com/tobya/jquerySelectedOptionSimple Combo box selected item chooser
MIT
by Toby Allen
jquery select combobox
Allows all Select Form elements to specify an initial value as a 'data-SelectedOption' attribute on the select tag., (*1)
Note: Backward Comptatibility Break select attribute renamed to 'data-SelectedOption' instead of 'data_SelectedOption (dash instead of underbar) to match HTML5 custom attribute specifications (i.e. now the html will validate)., (*2)
html, (*3)
<select name="select" data-SelectedOption="3"> <option value="ERROR" data-noscriptitem>ERROR: If you see this an error has occured</option> <option value="1">Banana</option> <option value="2">Apple</option> <option value="3">Pear</option> <option value="4">Orange</option> </select>
javascript, (*4)
<script type="text/javascript"> $('Document').ready(function(){ $('Select').SelectedOption(); }); </script>
Option 3 Pear will be selected., (*5)
Demo, (*6)
Simple Combo box selected item chooser
MIT
jquery select combobox