javascript - Display a link to the status of my latest tweet using jQuery & how to execute it? -


so have jquery in <head> of page this:

<script language="javascript" type="text/javascript" src="./javascript/jquery-1.2.6.js"></script> 

and gratefully given code display linked text reads 'read' , link latest tweet's status , looks this:

jquery.getjson('http://twitter.com/status/user_timeline/brianj_smith.json?count=1&callback=?', function(data){ if (data.length > 0) {     var link = jquery('<a>').attr('http://twitter.com/brianj_smith/status/' + data[0].id)                             .text('read'); }); 

now not expert @ jquery, don't know how make above jquery coding work , text "read" displayed on website, while @ same time being linked status of latest tweet.

i think makes sense part. if me out great. know made post earlier, didn't understand of being said :s

you add @ben's code in existing:

jquery.getjson('http://twitter.com/status/user_timeline/brianj_smith.json?count=1&callback=?', function(data){ $('#tweetlink').append('<a href="http://twitter.com/brianj_smith/status/' + data[0].id_str + '">read tweet</a>'); }); 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -