I am using this plugin.
However, it seems global variables are being used
$.blockUI();
$.unblockUI();
I have different instances of this block.
$(document).ajaxStart(function (e)
{
$.blockUI();
});
$(document).ajaxStop(function (e)
{
$.unblockUI();
})
var ajax =
ajax .success(function (response)
{
var valid = checkIfValid(response);
if(valid)
{
$.blockUI();
}
});
So that’s what I have. I put
$.blockUI();
to keep it simple without parameters, but in my real code I have messages and other parameters.
So now the problem is that after success is completed, ajax stop calls and unlocks everything. I just want the one that was launched at the beginning of ajax not to get rid of what was in the actual.
Therefore, I need different instances.
source
share