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 |
How can we apply css in odd childs of parent node using jquery library?
What are the fastest selectors in jQuery?
Explain the use of data-role=”page” attribute? : jQuery Mobile
How can events be prevented to work after an ajax request?
How we can get the input value of an element using jquery?
What is the difference between event.PreventDefault and "return false"?
What does $("div.parent") will select?
What is the difference between map and grep function in jquery?
Explain the use of the $.fn.bind and $.fn.trigger.
Explain the concepts of "$ function" in jquery with an example?
Explain the use of each function in jquery?
What is finish method in jQuery?