Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;(function($, window, undefined){
- // defaults
- var url = null,
- method = 'GET',
- data = {
- action:'', // defined the action that the php script will call a do_action for,
- // allows you to segment your php ajax scripts into wp_ajax action calls
- other_data_per_call: {}
- };
- //change defaults here
- var url = $('[data-url-holder-for-element]');
- $.ajax(data).done(function(resp){
- $(document).trigger('qbo:ajax:done', resp);
- }).always(function(resp){
- $(document).trigger('qbo:ajax:always', resp);
- })
- })(jQuery, window)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement