Opened 13 years ago
Closed 13 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.
Note: See
TracTickets for help on using
tickets.
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