Ma prettyPhoto non si istanzia sugli elementi... ma così:
codice:
$("a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'});$(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'normal',theme:'facebook',slideshow:3000, autoplay_slideshow: false});
$(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({animation_speed:'fast',slideshow:10000, hideflash: true});
Infatti, per rendere cliccabili le miniature caricate successivamente si fa ricorso a:
codice:
jQuery("body").on("click", "a[rel^='prettyPhoto']", function() { jQuery.prettyPhoto.open(jQuery(this).attr("href"),"","");
return false;
})
... la difficoltà è che così non prende il tema (look) prefissato sui nuovi elementi.