aboutsummaryrefslogtreecommitdiffstats
path: root/demos/controlgroup/splitbutton.html
diff options
context:
space:
mode:
Diffstat (limited to 'demos/controlgroup/splitbutton.html')
-rw-r--r--demos/controlgroup/splitbutton.html23
1 files changed, 9 insertions, 14 deletions
diff --git a/demos/controlgroup/splitbutton.html b/demos/controlgroup/splitbutton.html
index 5d4c7b3ce..a72cefd96 100644
--- a/demos/controlgroup/splitbutton.html
+++ b/demos/controlgroup/splitbutton.html
@@ -19,27 +19,19 @@
$( "select" ).selectmenu({
classes: {
"ui-selectmenu-button": "ui-button-icon-only"
+ },
+ change: function(){
+ $( ".output" ).append( "<li>" + this.value + "</li>" );
}
- }).selectmenu( "widget" ).removeClass( "ui-icon-end" );
- $( ".controlgroup" ).controlgroup();
- $( "select" ).on( "selectmenuchange", function(){
- alert( this.value );
});
+ $( ".controlgroup" ).controlgroup();
$( "button" ).click(function() {
- alert( "Running the last action" );
+ $( ".output" ).append( "<li>Running Last Action...</li>" );
});
});
</script>
- <style>
- select {
- width: 2em;
- }
- </style>
</head>
<body>
-<div class="demo-description">
-<p>A Controlgroup creating a split button</p>
-</div>
<div class="widget">
<h1>Split button</h1>
<div class="controlgroup">
@@ -50,9 +42,12 @@
<option>Delete</option>
</select>
</div>
+ <br/>
+ <h3>Output:</h3>
+ <ul class="output"></ul>
</div>
<div class="demo-description">
- <p>A Controlgroup creating a split button</p>
+ <p>A controlgroup creating a split button, by combining a button and a selectmenu. We adjust the classes option on the selectmenu to show only the icon</p>
</div>
</body>
</html>