Skip to content
Permalink
Browse files

$.widget: Fixed #3633: Moved call to _init outside of constructor. Th…

…is makes it possible to invoke callbacks during initialization and have those callbacks use the widget.
  • Loading branch information
scottgonzalez committed Jan 19, 2009
1 parent f0aa486 commit 67fb2c8a68123373a8fffa9d71e4af5ce2e6dc23
Showing with 1 addition and 3 deletions.
  1. +1 −3 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

0 comments on commit 67fb2c8

Please sign in to comment.
You can’t perform that action at this time.