How to execute jQuery? -


here code:

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'); }); 

i not sure how execute on website -- using javascript if possible. can give me helping hand?

edit:

i'm not having luck getting text 'read' show up...at all. not skilled @ jquery on whole. i've begun use it. have jquery in head of page.

place code snippet somewhere on page(i assume jquery.js included on page):

<script type="text/javascript">     jquery(function(){         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('href', 'http://twitter.com/brianj_smith/status/' + data[0].id)                             .text('read');              }         });      }); </script> 

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 -