joaopereirawd / fakeLoader.js

fakeLoader.js is a lightweight jQuery plugin that helps you create an animated spinner with a fullscreen loading mask to simulate the page preloading effect.
MIT License
721 stars 270 forks source link

How can i pro-grammatically close the fake loader. i want to close it on an event. #30

Open eshiett1995 opened 6 years ago

eshiett1995 commented 6 years ago

I want to start and stop the fake loader pro-grammatically on an event success. How can i achieve this ?

ktunprasert commented 6 years ago

A quick google search has led me to https://github.com/joaopereirawd/fakeLoader.js/pull/17/files?short_path=04c6e90 I've managed to make the fakeLoader continues until ajax success. The option {release:true} is what you're looking for. Oops I forgot to say you should also use {blockMode: true} just like the link instead of the arbitrary timeout.

ktunprasert commented 6 years ago

I just realised that the blockMode does not work however you can just make fakeloader disppear upon ajax success using jQuery.

eshiett1995 commented 6 years ago

@ktunprasert okay, i will try that