aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/source/ui.core.js11
1 files changed, 2 insertions, 9 deletions
diff --git a/ui/source/ui.core.js b/ui/source/ui.core.js
index 22fecb960..7b96ced5a 100644
--- a/ui/source/ui.core.js
+++ b/ui/source/ui.core.js
@@ -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));
}
});
};