]> source.dussan.org Git - jquery-ui.git/commitdiff
Core: Reverted back to r149: Removed wrapper changes.
authorScott González <scott.gonzalez@gmail.com>
Fri, 6 Jun 2008 11:30:22 +0000 (11:30 +0000)
committerScott González <scott.gonzalez@gmail.com>
Fri, 6 Jun 2008 11:30:22 +0000 (11:30 +0000)
ui/source/ui.core.js

index 22fecb960c890844edf534779936e79662eec2b4..7b96ced5a19dda9a3ee13ff16e87f3015575739d 100644 (file)
@@ -100,18 +100,11 @@ $.widget = function(name, prototype) {
                }
                
                return this.each(function() {
-                       var instance = $.data(this, name), self = this;
-                       
+                       var instance = $.data(this, name);
                        if (isMethodCall && instance) {
                                instance[options].apply(instance, args);
                        } else if (!isMethodCall) {
-                               var instance = new $[namespace][name](this, options), target = instance.element || $(this);
-                               
-                               if (target.is('.ui-wrapper')) {
-                                       self = target[0];
-                               }
-                               
-                               $.data(self, name, instance);
+                               $.data(this, name, new $[namespace][name](this, options));
                        }
                });
        };