diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-01-19 01:30:02 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-01-19 01:30:02 +0000 |
commit | 67fb2c8a68123373a8fffa9d71e4af5ce2e6dc23 (patch) | |
tree | 93c5f18835e54f52f8997a8421cc0830e6b86430 /ui | |
parent | f0aa486bd6f1a5cec632ec4ccf97c80c48933da7 (diff) | |
download | jquery-ui-67fb2c8a68123373a8fffa9d71e4af5ce2e6dc23.tar.gz jquery-ui-67fb2c8a68123373a8fffa9d71e4af5ce2e6dc23.zip |
$.widget: Fixed #3633: Moved call to _init outside of constructor. This makes it possible to invoke callbacks during initialization and have those callbacks use the widget.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.core.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js index 458857d14..7185ee38e 100644 --- a/ui/ui.core.js +++ b/ui/ui.core.js @@ -269,7 +269,7 @@ $.widget = function(name, prototype) { // constructor (!instance && !isMethodCall && - $.data(this, name, new $[namespace][name](this, options))); + $.data(this, name, new $[namespace][name](this, options))._init()); // method call (instance && isMethodCall && $.isFunction(instance[options]) && @@ -307,8 +307,6 @@ $.widget = function(name, prototype) { .bind('remove', function() { return self.destroy(); }); - - this._init(); }; // add widget prototype |