jQuery.ajax({url: "/minicon_widget/86/"}).done(function(data) { $('script[src="/minicon_embed/86/"]').after(data); });