Código HTML:
<script language="JavaScript" type="text/javascript"> //<![CDATA[ window.onload = function() { myHeight = new fx.Height('box1', {duration: 500}); $('height').onclick = function() { myHeight.toggle(); }; myMargin = new Fx.Style('box4','width',{duration: 500}); $('margin').onclick = function() { myMargin.start(0, 100); }; }; //]]> </script> <p><a href="javascript:void(0)" id="height">fx.Height</a></p> <div id="box1" style="width:100px;background-color:#cccccc;"> <br /> <br /> <br /> </div> <p><a href="javascript:void(0)" id="margin">fx.Style</a></p> <div id="box4" style="height:100px;width:100px;background-color:#cccccc;"> </div>