Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-29-2011, 04:46 PM   PM User | #1
pruocco
New Coder

 
Join Date: Sep 2011
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
pruocco is an unknown quantity at this point
Picasa Web Album Images

Hi all,

I found a small code that displays (x) amount of thumbnails from the latest uploads to my Picasa Web Album. The thumbnails themselves are links which bring you to the image in the Web Album. What I would like to do instead, is have it link directly to the image so that I can have the thumbnails open the image in a lightbox or something.

Here is the code. The red text is what makes the thumbs hyperlinks.

Code:
<script src="http://bloggerbuster-tools.googlecode.com/files/jquery.min.js" type="text/javascript"></script>    
<script type="text/javascript">
	$j = jQuery.noConflict();
	$j(document).ready(function(){
	$j.getJSON("http://picasaweb.google.com/data/feed/base/user/115324847528111351560?kind=photo&thumbsize=72c&access=public&alt=json&callback=?",
			function(data){
			  var thumbCount = 16;
			  var smallThumb = 0;
			  var mediumThumb = 1;
			  var largeThumb = 2;
			  var picsCount = data.feed.entry.length - 1;
			  for (var i = picsCount; i > picsCount - thumbCount; i--) {
					var pic = data.feed.entry[i];
					$j("<img/>").attr("src", pic.media$group.media$thumbnail[smallThumb].url).attr("alt", pic.summary.$t).appendTo("#picasaStream").wrap("<a href=" + pic.link[1].href + " target='_blank'>");
			  }
			  });
			});
  </script>
<div id="picasaStream"></div>
Thanks for the help!
pruocco is offline   Reply With Quote
Old 01-03-2012, 04:43 PM   PM User | #2
pruocco
New Coder

 
Join Date: Sep 2011
Posts: 20
Thanks: 1
Thanked 0 Times in 0 Posts
pruocco is an unknown quantity at this point
Any help is still needed and appreciated!
pruocco is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:43 AM.


Advertisement
Log in to turn off these ads.