Codice PHP:<script type="text/javascript">
var listToSlider = (function( listClassname ){
//Selezioni tutti gli elementi lista con uno specifico classname
var lists = $( '.' .listClassname );
var slideShow = (function( currentImage ){
currentImage.fadeOut( 5000 );
if ( currentImage.next( ).length === 0 )
currentImage = currentImage.parent( ).children(":first");
else
currentImage = currentImage.next();
currentImage.fadeIn( 5000 );
});
lists.each(function( ){
var firstImg = $(this).children(":first");
firstImg .addClass("first");
$(this).find('img').each(function(){
$(this).css('display','none');
});
slideShow( firstImg );
});
})( 'ppt' );
</script>
//alla prossima puntata come creare il throttle per l'animazione

Rispondi quotando