jQuery fadeToggle() Method
jQuery fadeToggle() Method
The fadeToggle() method is used to toggles between the fadeIn() and fadeOut() methods. If the elements are faded in, fadeToggle() will fade them out. If the elements are faded out, fadeToggle() will fade them in.
Syntax:-
Its syntax is:- $(selector).fadeToggle(speed, easing, callback)
Further Explanation:-
Parameter | Description |
---|---|
speed | Optional. Specifies the speed of the fading effect. The default is 400 milliseconds. |
easing | Optional. Specifies the speed of the element at different points of the animation. The default is swing. |
callback | Optional. A function to be executed after the fadeToggle() method is completed. |