Core: Reverted back to r149: Removed wrapper changes.

This commit is contained in:
Scott González 2008-06-06 11:30:22 +00:00
parent 01f336e242
commit 59645bd754

View File

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