Bug Tracker

Opened 10 years ago

Closed 10 years ago

#6117 closed bug (invalid)

re-initialization of plugin

Reported by: cyburk Owned by:
Priority: Milestone: 1.4.2
Component: core Version: 1.4.1
Keywords: re-initialization Cc:
Blocked by: Blocking:

Description

see following example code:

(function($) {

$.plugin = {

key: value, pluginCallback: undefined, init: function(callback) {

$.plugin.pluginCallback = callback;

}

}

})(jQuery);

when the plugin loads for the first time, $.plugin.pluginCallback is set to undefined. after calling $.plugin.init(function(){doSomething();}); pluginCallback is set to the anonymous callback function; however somehow (haven't had time to investigate further) the plugin is initialized again and thus pluginCallback starts to be undefined again.

Change History (1)

comment:1 Changed 10 years ago by john

Resolution: invalid
Status: newclosed

Perhaps you're calling init again with no callback? You should bring this up for discussion on the forum: http://forum.jquery.com/developing-jquery-plugins

Note: See TracTickets for help on using tickets.