Interviewer And Interviewee Guide

jQuery Interview Question:

Define slideToggle() effect?

Submitted by: Administrator
slideToggle() 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:

Read Online jQuery Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.