Dependency between plugins? Calling a method before plugin is created
I have 2 plugins, 1 of them is always there, the other not. During the
initialization of plugin 2, I try to access a settings variable from
plugin 1, but get an error because plugin 1 hasn't been created yet (load
order). i.e.:
;(function$) {
$.plugin2 = function(el, options) {
...
...
var init = function() {
plugin.settings = $.extend({}, defaults, options);
plugin.el = el;
var init = function() {
...plugin1Instance.settings.variable... <--------
}
init();
};
});
Would prefer not doing the timeOut method, was wondering what would be the
cleanest way of going about this.
No comments:
Post a Comment