From 001a22a9d68eae09a056271804d980e65da636e1 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 2 Mar 2010 02:58:52 +0000 Subject: Buttonset: Use :data(button) instead of .ui-button to find buttons that have already been instantiated. This prevents us from finding elements that are proxying buttons, e.g., a radio's label. Fixes #5242 - radio buttonset with icons does not maintain state. --- ui/jquery.ui.button.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 40b0ee48d..62f7a02f5 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -236,7 +236,7 @@ $.widget( "ui.button", { $.widget( "ui.buttonset", { _create: function() { this.element.addClass( "ui-button-set" ); - this.buttons = this.element.find( ":button, :submit, :reset, :checkbox, :radio, a, .ui-button" ) + this.buttons = this.element.find( ":button, :submit, :reset, :checkbox, :radio, a, :data(button)" ) .button() .map(function() { return $( this ).button( "widget" )[ 0 ]; @@ -269,5 +269,5 @@ $.widget( "ui.buttonset", { } }); - +$.fn.log = function() { console.log(this); return this; }; })( jQuery ); -- cgit v1.2.3