This works:
$(function(){
$.ajax({
url: 'http://files.main.bloggerstop.net/uploads/3/0/2/5/3025338/snowstorm.js',
async: false,
dataType: "script",
});
});
However this doesn't:
$("a#trigger").click(function(){
$.ajax({
url: 'http://files.main.bloggerstop.net/uploads/3/0/2/5/3025338/snowstorm.js',
async: false,
dataType: "script",
});
});
This is a seasonal hack for a site (not mine), so it doesn't have to be perfect. Just need to be able to load an external .js file on click.
Thanks :).
errorjust in case the request fails. In this case, that's not the problem at all, but it's something you probably want to include when using AJAX