Button demo: Coding standards.

This commit is contained in:
Scott González 2011-01-10 21:58:17 -05:00
parent fb71ebad6a
commit 33fa0ce2b2

View File

@ -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" )
@ -19,19 +22,19 @@
alert( "Running the last action" );
})
.next()
.button( {
.button({
text: false,
icons: {
primary: "ui-icon-triangle-1-s"
}
})
.click( function() {
var menu = $(this).parent().next().show().position({
.click(function() {
var menu = $( this ).parent().next().show().position({
my: "left top",
at: "left bottom",
of: this
});
$(document).one("click", function() {
$( document ).one( "click", function() {
menu.hide();
});
return false;
@ -43,9 +46,6 @@
.menu();
});
</script>
<style>
.ui-menu { position: absolute; width: 100px; }
</style>
</head>
<body>