var monEffet = new Fx.Styles('chainTest'); var legend = $('monitor'); legend.setText("[ Début ]"); monEffet.start({ width:'200px' }).chain( function() { // Etape 1 legend.setText("-] Etape 1 ..."); monEffet.start({ 'background-color':'#BF2', color:'#000'}); } ).chain ( function(){ ;// Etape 2 legend.setText("-]] Etape 2 ..."); monEffet.start.delay( 1000, monEffet,{ opacity:0 }); } ).chain ( function(){ // Etape 3 legend.setText("-]]] Etape 3 ..."); monEffet.start.delay( 3000, monEffet,{ 'background-color':'#0C3', color:'#fff', opacity:1 }); } ).chain ( function(){ // Fin legend.setText("[ Fin ]"); if (confirm("T'as compris le chainage ?")) $('chainTest').setText("Eh ben t'es fort !"); else $('chainTest').setText("Concentre toi et relance l'animation !"); legend.setText("Lancez la chaine d'exécution en cliquant ici"); } );