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