Making Flickr Badges Open New Window - jQuery Edition

Posted Tuesday, October 26, 2010 8:55:56 AM
Over a year ago I wrote an article about how to make images in a Flickr Badge open in their own window. This article has received a lot of attention, and many people have used the code on their website... however, a few people have inquired about me posting a jQuery version of this code. So, for all of those who have jQuery installed and would like to make your Flickr Badges open photos in their own window, here is the code:

$("#flickr_badge_wrapper a").attr("target","_blank");

Just as with the previous code I provided, this code should be placed within <script> tags and should appear either after your Flickr Badge or in a function that doesn't get called until the badge is loaded, like a body.onload or a jQuery "document".ready function.
Related Articles
Making Flickr Badges Open New Window (Monday, August 31, 2009 11:24:05 AM)
Comments: 1 (View | Post)
Categories: Technical

Post A Comment

View Comments

There are 1 comments on this article
Cassandra Bryan Design (8 years ago)
Thanks! I have been looking everywhere for this for a website I am working on.