Okay
  Public Ticket #1176315
How I open preloader manually?
Closed

Comments

  • AkimotoAkira started the conversation

    Hi.

    I have a button to send ajax form and I want to show preloader then hide preloader when ajax finished.

    Which function or class I can use them?

    Thanks.

  •  172
    Nikita replied

    Hi.

    To show preloader you need to make some custom animation. This one:

    function openPreloader () {
       Godlike.openPreloader();
       var $content = $('.nk-preloader').find('.nk-preloader-content, .nk-preloader-skip');
       TweenMax.to($content, 0.3, {
           y: '0px',
           opacity: 1,
           display: 'block',
           force3D: true
       });
    }
    // run
    openPreloader();
    

    To hide preloader just run default Godlike function:

    // run
    Godlike.closePreloader();
    

    Best regards, nK.


    - Kirillovykh Nikita, Founder of nK

    Rate Producthttps://themeforest.net/downloads
    Follow Facebook: https://www.facebook.com/nKPremiumThings/
    Follow Twitterhttps://twitter.com/nkdevv
    Subscribehttps://nkdev.info/#subscribe