jQuery fadeOut: Main Tips
- jQuery
.fadeOut()
runs a fade out animation on the selected element. - Once the animation finishes, the element is transparent.
Writing and Using .fadeOut()
The jQuery .fadeOut()
method animates the opacity of the selected element, thus creating a fade out animation.
Here is the syntax you would use for this method:
$("selector").fadeOut(length, easing, callback);
.fadeOut()
jQuery method takes three arguments:
length
describes the duration of the animation in milliseconds (400
by default), or using keywordsslow
(600 ms) andfast
(200 ms).easing
defines if the animation speed is linear (linear
), or starts off slow and speeds up (swing
- the default value).callback
names a function to call once the animation finishes.