jQuery $.get doesn't put out any data -
what i'm trying catch data file , insert file's (the 1 that js in) div. won't work , can't seem find failure in here. googled it, gave me no answers. suggestions?
jquery:
$(document).ready(function(){ $("li#twitter-widget a").click(function(event){ $('<span class="loading">lade inhalte</span>').appendto("div#news-widget"); $.get("widgets/twitter.widget", function(data){ $(data).find("div.twtr-doc").appendto("div#news-widget"); alert( data ); $('span.loading').remove(); }); }); });
the twitter.widget
http://nopaste.info/1a6c866a15.html
the html want data inserted to
http://nopaste.info/435800b8f8.html
the problem
alert(data) doesn't put out anything.
jquery injects scripts retrieved via ajax dom , removes them "data". since "twitter.widget" nothing more 2 script elements, "data" going empty.
you might want use $.getscript instead.
Comments
Post a Comment