Skip to content

Instantly share code, notes, and snippets.

@pixelbart
Last active April 17, 2018 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pixelbart/f4f4959ad6386abdda89d2f2ba4be489 to your computer and use it in GitHub Desktop.
Save pixelbart/f4f4959ad6386abdda89d2f2ba4be489 to your computer and use it in GitHub Desktop.
load scripts after ajax load
var data = {};
data['test'] = 'test';
var response = $.ajax({
url : ajax_url,
data : data
});
response.always(function() {
$.getScript('file.js');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment