HEX
Server: LiteSpeed
System: Linux host.point2pointhosting.com 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
User: nolabhpoint2p (1291)
PHP: 8.4.15
Disabled: NONE
Upload Files
File: /home/nolabhpoint2p/public_html/wp-content/themes/PoinTheme/functions/admin/assets/dashboard.js
(function($) {

  /* globals jQuery */

  "use strict";

  /**
   * $(document).ready
   * Specify a function to execute when the DOM is fully loaded.
   */

  $(function($) {

    /**
     * Dashboard | Deregister theme | Confirmation
     */

    $('.form-deregister .confirm.deregister').on('click', 'a', function(e) {
      e.preventDefault();

      $(this).parent().hide()
        .next().fadeIn();
    });

    $('.form-deregister .question').on('click', 'a.cancel', function(e) {
      e.preventDefault();

      $(this).parent().hide()
        .prev().fadeIn();
    });

    /**
     * Tools | Regenerate
     */

    $('.tools-do-ajax').on('click', function(e) {
      e.preventDefault();

      var $btn = $(this);

      var btn_txt = $btn.text(),
        action = $btn.attr('data-action');

      if( $btn.hasClass('loading') ){
        return;
      }

      $btn.addClass('loading').text('Please wait...');

      $.ajax({
        url: ajaxurl,
        data: {
          'mfn-builder-nonce': $btn.attr('data-nonce'),
          action: action
        },
        type: 'POST',
        success: function(response){
          $btn.removeClass('loading').text('Done');
          setTimeout(function() { $btn.text(btn_txt); }, 2000);
        }
      });

    });

  });

})(jQuery);