$( function() { if( !NBNOTE.checkCSSSupport( ['transition', 'transform'] ) ){ alert( 'sorry, your browser is not supported.' ); return; } var target = $('.box' ), serialList = new NBNOTE.SerialList(); serialList.addCommand( new NBNOTE.Animate( target, { margin: 20 } ), new NBNOTE.Wait( 500 ), new NBNOTE.Transform( target, 'rotate(360deg)', 500, 'ease-out' ), new NBNOTE.Wait( 500 ), new NBNOTE.Transform( target, 'rotate(0deg)', 500, 'ease-out' ), new NBNOTE.Wait( 500 ), new NBNOTE.Transform( target, 'rotate(360deg)', 500, 'ease-out' ), new NBNOTE.Wait( 500 ), new NBNOTE.Animate( target, { margin: 0 } ), new NBNOTE.Func( function(){ alert('finished.') } ) ); serialList.execute(); } );