var params = $("#tweets").attr("rel"); params = params.split("|"); username = params[0]; count = params[1]; var format='json'; var url='http://api.twitter.com/1/statuses/user_timeline/'+username+'.'+format+'?callback=?'; $.getJSON(url,function(tweet){ var tweets='<ul>'; for (i=0;i<=count;i++){ tweets+= "<li>" + (tweet[i].text) + "</li>"; } tweets+= "</ul>";
var start = tweets.indexOf("http"); var end = tweets.indexOf(" ", start); var len = end - start; var link = tweets.substr(start,len) console.log(start + " " + end + " " + link);
I have a little script that pulls down my twitter feed into a ul
The only problem is that the links in the text are just text rather than hyper links.
How can I loop through the content and change each http://www.something.com into proper
I'm fairly new to JS so please be gentle with me.
Thanks.
In case it helps here is the code so far.
Place the folowing where you want the list to be displayed and style it with some css.