var paper; window.onload = function(){ paper = Raphael(0,0,"100%","100%"); c =paper.circle($(window).width()/2, $(window).height()/2, 100) .attr({fill:"r(0.7,0.7)#808-#505",stroke:"none"}); c.click(animation); function animation(){ c.animate({r:c.getBBox().width/2-10}, 1000,"linear"); } }
<script type="text/javascript" src="http://dl.dropbox.com/u/63305355/raphael-min.js"></script> <div id="canvas"> <div class="text"> ANIMATE <div id="result"></div> </div> </div>
body,html { height:100%; margin:0; } #canvas { height:99%; background:#303; text-align:center; } .text{ letter-spacing: 0px; color:#fff; font-size:150%; position:absolute; text-align:center; top:40%; left:0%; width:100%; z-index:1; background:#000; opacity:0.5; } #result{ font-size:60%; letter-spacing: 5px; } input{ padding:3px; }