Open this twitter script links in new tab

Soldato
Joined
10 May 2004
Posts
3,790
Location
East Yorkshire, UK
Hi

Got this script off this forum at this thread (http://forums.overclockers.co.uk/showthread.php?t=18108404&highlight=Twitter)


Code:
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/ARMWILSON.json?callback=twitterCallback2&amp;count=5"></script>

How can I do it so when it says 'Last Updated ... hours ago' so when clicked it is a new tab,rather then replacing the website with twitter?

Cheers
 
Because the script is coming directly from Blogger, you can't change it (unless you download it and host on your own site ofc). However, you could simply run a jquery script on your site which changes the target attribute of the link. Something like:

Code:
$(function() {
  $("DIV.tweetcontainer A.last-updated-link").attr("target", "_blank");
});
Obviously you'll need to change the selector to something that works for you :)
 
Back
Top Bottom