jQuery.ajax({url: "/quiz_widget/790/"}).done(function(data) { $('script[src="/quiz_embed/790/"]').after(data); });