diff options
Diffstat (limited to 'demos/popup/popup-menu.html')
-rw-r--r-- | demos/popup/popup-menu.html | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/demos/popup/popup-menu.html b/demos/popup/popup-menu.html index 824b78651..0d441a33a 100644 --- a/demos/popup/popup-menu.html +++ b/demos/popup/popup-menu.html @@ -4,7 +4,7 @@ <title>jQuery UI Popup - Popup Menu</title> <link rel="stylesheet" href="../demos.css" /> <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css" title="ui-theme" /> - <script src="../../jquery-1.6.2.js"></script> + <script src="../../jquery-1.7.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> @@ -16,16 +16,13 @@ function log( msg ) { $( "<div/>" ).text( msg ).appendTo( "#log" ); } - var selected = { - select: function( event, ui ) { - log( "Selected: " + ui.item.text() ); - $(this).popup("close"); - } - }; + var selected = function( event, ui ) { + log( "Selected: " + ui.item.text() ); + $(this).popup( "close" ); + } + + $("#button1").button().next().menu( {select: selected, trigger: $("#button1")} ); - $("#button1").button() - .next().menu(selected).popup(); - $( "#rerun" ) .button() .click(function() { @@ -39,10 +36,7 @@ } }) .next() - .menu(selected) - .popup({ - trigger: $("#select") - }) + .menu( {select: selected, trigger: $("#select")} ) .parent() .buttonset({ items: "button" @@ -69,8 +63,8 @@ <li><a href="#">Utrecht</a></li> <li><a href="#">Zurich</a></li> </ul> - - + + <div> <div> <button id="rerun">Run last action</button> |