if you want to know if the plugin is active, use the global variable as follows:
$.fn.my_func(params)
{
if(window.my_func_active)
{
console.log('Cannot run plugin');
return;
}
window.my_func_active = true;
endme = function()
{
delete window.my_func_active;
}
}
source
share