From 40a9d1dfdb6a341904ae7bcd4600b0ef201d14df Mon Sep 17 00:00:00 2001 From: Alexander Schmitz Date: Fri, 22 Aug 2014 23:39:35 -0400 Subject: Controlgroup: Inital commit of new widget This widget replaces the buttonset widget --- demos/controlgroup/splitbutton.html | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'demos/controlgroup/splitbutton.html') 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( "
  • " + this.value + "
  • " ); } - }).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( "
  • Running Last Action...
  • " ); }); }); - -
    -

    A Controlgroup creating a split button

    -

    Split button

    @@ -50,9 +42,12 @@
    +
    +

    Output:

    +
    -

    A Controlgroup creating a split button

    +

    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

    -- cgit v1.2.3