Advertisement
Guest User

sdbrtergfdfs

a guest
Jun 17th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;(function($, window, undefined){
  2.    
  3.     // defaults
  4.     var url = null,
  5.         method = 'GET',
  6.         data = {
  7.             action:'', // defined the action that the php script will call a do_action for,
  8.                        // allows you to segment your php ajax scripts into wp_ajax action calls
  9.             other_data_per_call: {}
  10.         };
  11.    
  12.     //change defaults here
  13.     var url = $('[data-url-holder-for-element]');
  14.    
  15.    
  16.    
  17.     $.ajax(data).done(function(resp){
  18.         $(document).trigger('qbo:ajax:done', resp);
  19.     }).always(function(resp){
  20.         $(document).trigger('qbo:ajax:always', resp);
  21.     })
  22.    
  23.    
  24. })(jQuery, window)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement