I'm with trouble with a jquery plugin i've quickly playing around. Its fades in when a start handle event of ajax is called and stops with complete handle.
Exemple:
start : function (e,o) {
target.mask();
target.showMaskAjax();
},
complete : function (e,o) {
target.hideMaskAjax();....
},
The question is..when I fire 2 ajax calls I want to correctly have access of variables inside "hideMaskAjax" where have been initialize in "target.mask()"
in target.mask() i've been trying:
this.mask = $("<div/>", {css: {display: "none"}).addClass("loading_mask");
this.spinner = $("<div/>", {css: {display: "none"}}).addClass("spinner");
And in target.hideMaskAjax():
alert(this.mask); //fail
Also creating global variables in plugin for this seems dont work for more than one invokes of it.