You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.
add local var and public method var isStop = false; //console.log(isStop); $.fn.fakeLoader.stop = function () { isStop = true; //console.log('call outside ' + isStop); };
check timeToHide is 0 or not, if 0 mean set interval timer to check 'isStop' value if (settings.timeToHide > 0) { setTimeout(function () { $(el).fadeOut(); }, settings.timeToHide); } else { var timer = setInterval(function () { //console.log(isStop); if (isStop) { $(el).fadeOut(); clearInterval(timer); } }, 200); }
finally HTML code: var loader = $('#fakeLoader'); // show loader.fakeLoader(); // disapear loader.fakeLoader.stop();
I'm looking for a way to trigger it based on a boolean value.
Sometimes the time taken to execute an action differs, so I'd prefer to be able to set a flag to display whether to display the loader or not.
The text was updated successfully, but these errors were encountered: