jQuery - animate()

The jQuery animate() method lets you create custom animations. The required params parameter defines the CSS properties to be animated. The optional speed parameter specifies the duration of the effect. It can take the following values: "slow", "fast", or milliseconds. The optional callback parameter is a function to be executed after the animation completes.

$(selector).animate({params},speed,callback);

http://api.jquery.com/category/effects/custom-effects/

 

 

 


$(document).ready(function ()
{
    $("#btnAnimate").click(function ()
    {
        $("#demo1").animate
        (
            {
                left: '250px',
                opacity: '0.5',
                height: '150px',
                width: '150px',
                margin: '0px 100px',
            }, 3000
        );
    });
});