Define slideToggle() effect?
Submitted by: AdministratorslideToggle() effect is used to give animated sliding effect to an element.
Syntax:
slideToggle([ duration] [, easing] [, callback])
"duration" is the number specifying how long the animation will run.
"easing" is the string which specify the function for the transition.
"callback" is the function which we want to run once the animation is complete.
If the element is visible then this effect will slide the element up side and make it completely hidden. If the element is hidden then slideToggle() effect will slide it down side and make it visible.
We can specify the toggle speed with this effect.
For example:
$("#clickme").click(function(){
$("#mydiv").slideToggle("slow", function(){
//run after the animation is complete.
});
});
Submitted by:
Syntax:
slideToggle([ duration] [, easing] [, callback])
"duration" is the number specifying how long the animation will run.
"easing" is the string which specify the function for the transition.
"callback" is the function which we want to run once the animation is complete.
If the element is visible then this effect will slide the element up side and make it completely hidden. If the element is hidden then slideToggle() effect will slide it down side and make it visible.
We can specify the toggle speed with this effect.
For example:
$("#clickme").click(function(){
$("#mydiv").slideToggle("slow", function(){
//run after the animation is complete.
});
});
Submitted by:
Read Online jQuery Job Interview Questions And Answers
Top jQuery Questions
☺ | Different ways of using $.connect function in jQuery? |
☺ | Explain how jQuery Works? |
☺ | Why is jQuery better than JavaScript? |
☺ | Advantages of jQuery. |
☺ | When can you use jQuery? |
Top Top World Wide Web Categories
☺ | Cascading Style Sheet CSS Interview Questions. |
☺ | HTML5 Interview Questions. |
☺ | Basic Internet Interview Questions. |
☺ | Domain Name System (DNS) Interview Questions. |
☺ | JavaScript Interview Questions. |