How do you implement animation functionality?
Answer / 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 |
What is ajax and how it works?
How to select class in jquery?
What is a jquery ajax?
Is numeric in jquery?
What is resize() function in jquery?
Is it possible to get value of multiple CSS properties in single statement?
What are the selectors in jquery? How many types of selectors in jquery?
Why is only the first page of multi page document loaded? : jquery mobile
What are the advantages of minified version of jquery?
Explain the difference between jquery-x.x.x.js and jquery.x.x.x min.js?
Explain remove class jquery with example?
What is the difference between parent() and parents() methods in jQuery?