jQuery Tutorial


jQuery Example


jQuery References


jQuery animate() Effect Reference


  All jQuery Effect References


Uses

jQuery animate() effect to Create a custom CSS animation for selected elements.


Syntax

$(selector).animate(styles,speed,[callback]) 

jQuery animate() effect supported following parameters.

ParameterDescription
styles
or
Examples
Required Parameter.
Allow to One or More CSS Properties separate by comma(,).
Following CSS Properties Use:
speed speed is Optional parameter. speed define the fading effect speed.
Specific Speed Values:
  • "slow"
  • "normal"
  • "fast"
  • "1000" (milliseconds)
callback Callback is optional parameter. It is use to represents a function to be executed whenever effect is completed.

jQuery animate() effect Example

<script type="text/javascript"> 
$(document).ready(function(){
  $("#btn1").click(function(){
    $("#divanimate").animate({height:"300px",width:"300px"});
  });
  $("#btn2").click(function(){
    $("#divanimate").animate({height:"100px",width:"100px"});
  });
});
<cript>
Online Try This Code Your Self....   »

  All jQuery Effect References