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
How to control page titles in jquery mobile? : jquery mobile
Tell me what is the use of .size() method in jquery?
What is the difference between prop and attr?
What is jquery a client or server scripting?
What is .siblings() method in jquery?
What is the difference between find and children methods?
Explain .live()? : jquery mobile
Explain chaining in jquery? : jquery mobile
How we can get the value of a radio button using jquery?
What are different type of selector in jQuery?
Which command will give a version of jQuery?
What are the features of jquery used in web applications?
What is event preventdefault () and event stoppropagation () in jquery?
What is event.stoppropagation? : jquery mobile
How do you select all elements with the class of “selected” in jquery?