]> source.dussan.org Git - jquery-ui.git/commitdiff
Controlgroup: Optimize and simplify data access and storage
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 30 Sep 2015 13:48:30 +0000 (15:48 +0200)
committerAlexander Schmitz <arschmitz@gmail.com>
Thu, 8 Oct 2015 18:02:58 +0000 (14:02 -0400)
ui/widgets/controlgroup.js

index c0720279560e8df88acd1a452f5fd5b8655ea177..77559e50aff0395509bd0c6d14b69ce3cfc353e2 100644 (file)
@@ -88,10 +88,8 @@ return $.widget( "ui.controlgroup", {
 
                                        // Store an instance of the controlgroup to be able to reference it later
                                        var widgetElement = element[ widget ]( "widget" );
-                                       widgetElement.data(
-                                               "ui-controlgroup-data",
-                                               element.data( "ui-" + widget.charAt( 0 ).toUpperCase() + widget.slice( 1 ) )
-                                       );
+                                       $.data( widgetElement[ 0 ], "ui-controlgroup-data",
+                                               element[ widget ]( "instance" ) );
 
                                        childWidgets.push( widgetElement[ 0 ] );
                                } );