codice:
<!DOCTYPE html>
<html>
<head>
<style>
.box{
width: 250px;
height: 100px;
margin: 0 auto;
background: #2dac00;
border: solid 5px #e3e3e3;
cursor: pointer;
}
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src='js/jquery.transit.js'></script>
</head>
<body>
<div class="box"></div>
<script>
//qui definisci la sequenza di colori
var arrayColory=new Array('#000000','#123456','#666666','#999999');
var arrId=0;
$(".box").click(function(){
arrId<arrayColori.length ? arrId++ : arrId=0;
$('.box').transition({
perspective: '100px',
rotateX: '180deg',
backgroundColor: arrayColori[arrId]
});
});
</script>
</body>
</html>