diff options
author | Felix Nagel <info@felixnagel.com> | 2011-09-27 23:15:23 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2011-09-27 23:52:44 +0200 |
commit | 4d56732195a9dd2e5e919b1a537a2f73dffa5c41 (patch) | |
tree | 634df3e4d43b48613a2732bc320b5aede29f9d15 /tests/visual/selectmenu | |
parent | 9c43d64312f47aba82596495796eed25b04c6656 (diff) | |
download | jquery-ui-4d56732195a9dd2e5e919b1a537a2f73dffa5c41.tar.gz jquery-ui-4d56732195a9dd2e5e919b1a537a2f73dffa5c41.zip |
Selectmenu: improved value option, added demo file
Diffstat (limited to 'tests/visual/selectmenu')
-rw-r--r-- | tests/visual/selectmenu/disabled.html | 8 | ||||
-rw-r--r-- | tests/visual/selectmenu/option.html | 62 |
2 files changed, 66 insertions, 4 deletions
diff --git a/tests/visual/selectmenu/disabled.html b/tests/visual/selectmenu/disabled.html index cf979a9ee..b096f95dd 100644 --- a/tests/visual/selectmenu/disabled.html +++ b/tests/visual/selectmenu/disabled.html @@ -121,12 +121,12 @@ <option value="someotherfile">Some other file</option> </optgroup> </select> - <br /> - <button id="disable_select">Toggle disable select</button> - <button id="disable_option">Toggle disable option</button> - <button id="disable_optgroup">Toggle disable optgroup</button> </fieldset> </form> +<br /> +<button id="disable_select">Toggle disable select</button> +<button id="disable_option">Toggle disable option</button> +<button id="disable_optgroup">Toggle disable optgroup</button> </div><!-- End demo --> diff --git a/tests/visual/selectmenu/option.html b/tests/visual/selectmenu/option.html new file mode 100644 index 000000000..1f70d0e56 --- /dev/null +++ b/tests/visual/selectmenu/option.html @@ -0,0 +1,62 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>jQuery UI Selectmenu - Event functionality</title> + <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css"> + <script src="../../../jquery-1.6.2.js"></script> + <script src="../../../ui/jquery.ui.core.js"></script> + <script src="../../../ui/jquery.ui.widget.js"></script> + <script src="../../../ui/jquery.ui.position.js"></script> + <script src="../../../ui/jquery.ui.button.js"></script> + <script src="../../../ui/jquery.ui.menu.js"></script> + <script src="../../../ui/jquery.ui.selectmenu.js"></script> + <link rel="stylesheet" href="../../../demos/demos.css"> + <script> + $(function() { + var mySelectmenu = $('select').selectmenu(); + + $("#value").click( function() { + mySelectmenu.selectmenu("option", "value", "Faster"); + }); + + $("#dropdown").toggle( function() { + mySelectmenu.selectmenu("option", "dropdown", false); + }, function() { + mySelectmenu.selectmenu("option", "dropdown", true); + }); + }); + </script> + <style> + form { margin: 20px 0 0 0 } + fieldset { border: 0; } + select { width: 200px; } + .overflow ul { height: 200px; overflow: auto; } + </style> +</head> +<body> + +<div class="demo"> + +<form action="#"> + <fieldset> + <label for="speed">Select a speed:</label> + <select name="speed" id="speed"> + <option value="Slower">Slower</option> + <option value="Slow">Slow</option> + <option value="Medium" selected="selected">Medium</option> + <option value="Fast">Fast</option> + <option value="Faster">Faster</option> + </select> + </fieldset> +</form> +<br /> +<!-- <button id="dropdown">Toggle dropdown style</button> --> +<button id="value">Set option value = 'Faster'</button> + +</div><!-- End demo --> + + + +</body> +</html> |