2010-04-23 3 views
0

Il est possible d'obtenir plus de photos de flickr. Quel est le numéro standard/par défaut?augmenter le nombre de photos de flickr en utilisant json

$(document).ready(function(){ 
    $.getJSON("http://api.flickr.com/services/feeds/[email protected]&lang=en-us&format=json&jsoncallback=?", function(data){ 
     $.each(data.items, function(i, item){ 
      var newurl = 'url(' + item.media.m + ')'; 
      $("<div class='images'/>").css('background', newurl).css('backgroundPosition','top center').css('backgroundRepeat','no-repeat').appendTo("#images").wrap("<a target=\"_blank\ href='" + item.link + "'></a>"); 
     }) 
     $("#title").html(data.title); 
     $("#description").html(data.description); 
     $("#link").html("<a href='" + data.link + "' target=\"_blank\">Visit the Viget Inspiration Pool!</a>"); 
     //Notice that the object here is "data" because that information sits outside of "items" in the JSON feed 

     $('.jcycleimagecarousel').cycle({ 
      fx: 'fade', 
      speed: 300, 
      timeout: 3000, 
      next: '#next', 
      prev: '#prev', 
      pause: 1, 
      random: 1 
     }); 
    }); 
}); 

Répondre

Questions connexes