How do you implement animation functionality?

Answer Posted / chaitanya

The .animate() method allows us to create animation effects on any numeric CSS property. This method changes an element from one state to another with CSS styles. The CSS property value is changed gradually, to create an animated effect.

Syntax is:

Hide Copy Code

(selector).animate({styles},speed,easing,callback)

styles: Specifies one or more CSS properties/values to animate.

duration: Optional. Specifies the speed of the animation.

easing: Optional. Specifies the speed of the element in different points of the animation. Default value is "swing".

callback: Optional. A function to be executed after the animation completes.

Simple use of animate function is,

Hide Copy Code

$("btnClick").click(function(){

$("#dvBox").animate({height:"100px"});

});

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you install/use jquery in a project.

648


What are the methods used to provide effects?

680


what is the use of param() method in jquery .

540


How we can check if an element is empty or not using jquery?

595


what does $("div") will select? : jquery mobile

638


Will Events Are Also Copied On Clone In Jquery?

616


How to give face effect in jquery?

624


Can you please explain the difference between javascript and jquery? : jquery mobile

601


Does jquery 2.0 supports ie? : jquery mobile

624


What are some of the ways to provide effects? : jQuery Mobile

602


explain width() vs css(‘width’) in jquery

620


Explain various methods to make ajax request in jquery? : jquery mobile

613


Tell me how to write browser specific code using jquery? : jquery mobile

603


What is the use of val() method in jquery?

669


Can there be more than one ready function in jquery?

577