In this chapter we'll be looking at the most basic types of jQuery animations, in which the element being animated gradually appears or disappears. There are several jQuery methods that deal with fading and we'll look at each of them in turn throughout the chapter. These methods are:
fadeIn()
fadeOut()
fadeTo()
fadeToggle()
show()
hide()
toggle()
In this chapter, we will learn:
How to create simple animations with the
fadeIn()
,fadeOut()
, andfadeToggle()
methodsHow to control the ending opacity value of the animation with the
fadeTo()
method
How to create fading animations with the
show()
andhide()
methodsHow to simplify our code with the
toggle()
methods