JQuery animate() ... several pixels per step - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:animate

Description

JQuery animate() ... several pixels per step

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.5.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){/*www. ja  v  a 2 s .  c  o m*/
    $.easing.test = function(p, n, firstNum, diff) {
        return firstNum + diff * (parseInt(p * 10) / 10);
    }
    $('div').animate({
        height: 200
    }, 2000, 'test')
    });

      </script> 
 </head> 
 <body> 
  <div style="background:red"></div>  
 </body>
</html>

Related Tutorials