diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-03-02 02:58:52 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-03-02 02:58:52 +0000 |
commit | 001a22a9d68eae09a056271804d980e65da636e1 (patch) | |
tree | 397986fdcbeff10d7ce98e44bed9dbfa6a6bdc37 /ui/jquery.ui.button.js | |
parent | c16246f5024ba926250226dc8eee9149aeb401b0 (diff) | |
download | jquery-ui-001a22a9d68eae09a056271804d980e65da636e1.tar.gz jquery-ui-001a22a9d68eae09a056271804d980e65da636e1.zip |
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.
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r-- | ui/jquery.ui.button.js | 4 |
1 files changed, 2 insertions, 2 deletions
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 ); |