Introduction
jQuery has simplified the adding of attractive visual effects on web pages. The library provides many supporting methods used to show, hide, fade, slide, toggle, and other custom animations. Let's briefly run through these methods:
Showing and hiding elements:
jQuery method
Description
.show()
This displays the matched elements
.hide()
This hides the matched elements
.toggle()
This displays or hides the matched elements
Fading elements:
jQuery method
Description
.fadeIn()
This animates the opacity of the matched elements by increasing them gradually until they reaches a value of 1, that is, they become opaque.
.fadeOut()
This animates the opacity of the matched elements by decreasing them gradually until they reaches a value of 0, that is, they become transparent.
.fadeTo()
This animates the opacity of the matched elements to the specified value.
.fadeToggle()
This animates the opacity of the matched elements to hide or display them.
Sliding elements...