aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-01-10 21:58:17 -0500
committerScott González <scott.gonzalez@gmail.com>2011-01-10 21:58:17 -0500
commit33fa0ce2b244ca4e47c04903253cda39089be7cc (patch)
tree6a09249c7e75a21db1872d454a340f72c77beea6
parentfb71ebad6a7022f3b17562df798f36defde057fd (diff)
downloadjquery-ui-33fa0ce2b244ca4e47c04903253cda39089be7cc.tar.gz
jquery-ui-33fa0ce2b244ca4e47c04903253cda39089be7cc.zip
Button demo: Coding standards.
-rw-r--r--demos/button/splitbutton.html52
1 files changed, 26 insertions, 26 deletions
diff --git a/demos/button/splitbutton.html b/demos/button/splitbutton.html
index 8baf12f00..966ec8b97 100644
--- a/demos/button/splitbutton.html
+++ b/demos/button/splitbutton.html
@@ -11,6 +11,9 @@
<script src="../../ui/jquery.ui.position.js"></script>
<script src="../../ui/jquery.ui.menu.js"></script>
<link rel="stylesheet" href="../demos.css">
+ <style>
+ .ui-menu { position: absolute; width: 100px; }
+ </style>
<script>
$(function() {
$( "#rerun" )
@@ -18,34 +21,31 @@
.click(function() {
alert( "Running the last action" );
})
- .next()
- .button( {
- text: false,
- icons: {
- primary: "ui-icon-triangle-1-s"
- }
- })
- .click( function() {
- var menu = $(this).parent().next().show().position({
- my: "left top",
- at: "left bottom",
- of: this
- });
- $(document).one("click", function() {
- menu.hide();
- });
- return false;
- })
- .parent()
- .buttonset()
- .next()
- .hide()
- .menu();
+ .next()
+ .button({
+ text: false,
+ icons: {
+ primary: "ui-icon-triangle-1-s"
+ }
+ })
+ .click(function() {
+ var menu = $( this ).parent().next().show().position({
+ my: "left top",
+ at: "left bottom",
+ of: this
+ });
+ $( document ).one( "click", function() {
+ menu.hide();
+ });
+ return false;
+ })
+ .parent()
+ .buttonset()
+ .next()
+ .hide()
+ .menu();
});
</script>
- <style>
- .ui-menu { position: absolute; width: 100px; }
- </style>
</head>
<body>