Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
</style>
</head>
<body>
  <h1 id="total">$0.99</h1>
  <button id="high">Change to $999.99</button>
  <button id="med">Change to $499.02</button>
  <button id="low">Change to $0.00</button>
  <script type="text/javascript" charset="utf-8">
    //<![CDATA[
      window.addEvent('domready', function(){
        var total = $('total');
        var totalFx = new Fx.CashRegister(total, {duration: 2000});
        
        $('high').addEvent('click', function(){
          totalFx.start(999.99);
        });
        
        $('med').addEvent('click', function(){
          totalFx.start(499.02);
        });
        
        $('low').addEvent('click', function(){
          totalFx.start(0.02);
        });
      });
    //]]>
    </script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers