Forums

Give help. Get help.

  • # November 6, 2008 at 11:01 am

    I am adding a Flickr stream to a website using Jquery and JSON as shown in Chris’ tutorial http://css-tricks.com/build-your-own-social-home/.

    Code:
    $.getJSON(“http://api.flickr.com/services/feeds/photos_public.gne?ids=52723107@N00&lang=en-us&format=json&jsoncallback=?”, function(data){
    $.each(data.items, function(index, item){
    $(““).attr(“src”, item.media.m).appendTo(“#flickr ul”)
    .wrap(“

  • “);
    });
    });

At the moment it is showing the last 20 pictures taken. Is there anyway to configure how many results actually show ( i only need about 5 or 6).

Thanks

pab
# November 6, 2008 at 7:11 pm

you just add an if statement at the end and you’ll be able to control the amount of pix

;if ( index == 6 ) return false;

for 5 pictures.

works like a charm,

hope it helps Charles

PS Chris the footer OH MY … siiiiiiiiiiick!!!!

# November 6, 2008 at 8:37 pm

Thanks pab!

Also must agree, Chris, the footer is amazing – i love the twitter spaceship.

pab
# November 8, 2008 at 11:33 pm

My Pleasure Charles, let me know if you need anything else

# January 10, 2009 at 7:40 am

Is there any way of getting random images from your Flickr stream?

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

icon-anchoricon-closeicon-emailicon-linkicon-logo-staricon-menuicon-nav-guideicon-searchicon-staricon-tag