Hello, is there a simple way to call the pre loader animation? I have some ajax calls, and I would like to call the same animation that happens between a common page loading.
There is no api for it. Preloader animation removed after load. But you can add it manually. I think you can clone it on page and show/hide when needed. Try this code:
jQuery(function ($) {
// clone existing preloader
var $preloader = $('.page-preloader').clone();
setTimeout(function () {
// insert to page (insert it only after main preloader is hidden, if you insert it before main preloader was hidden, this preloader content will be also removed after page load)
$preloader.hide().appendTo('body');
// show
$preloader.fadeIn(300);
// hide
setTimeout(function () {
$preloader.fadeOut(300);
}, 5000);
}, 10000);
});
Hello, is there a simple way to call the pre loader animation? I have some ajax calls, and I would like to call the same animation that happens between a common page loading.
Hi, Heigler.
There is no api for it. Preloader animation removed after load. But you can add it manually. I think you can clone it on page and show/hide when needed. Try this code:
Best regards, nK.
Rate our Works: https://themeforest.net/downloads
Follow on Twitter: https://twitter.com/nkdevv
Worked! Thanks Nikita :)