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
Post a Comment