Chapter 4. Sliding Animations

Another type of effect that is built into jQuery is the slide effect. Elements can be made to slide vertically so that they appear to open or close depending on their current state. There are three methods related to sliding that are exposed by jQuery:

slideDown()
slideUp()
slideToggle()

How each of these methods works will be explored thoroughly over the course of this chapter.

Some of the skills we'll learn include:

  • Showing hidden elements with slideDown()
  • Hiding visible elements with slideUp()
  • How an element's CSS styling can influence sliding animations
  • How we can save code with slideToggle()
  • How to add easing effects to sliding animations
  • How to deal with a common usability issue with sliding animations triggered ...

Get jQuery 1.4 Animation Techniques Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.