jQuery EffectsLesson 7Free preview
jQuery Hide/Show
This lesson is part of jQuery · All levels
Summary
The hide(), show(), and toggle() methods are used to hide, display, or exchange the look of an element. All three receive the speed parameter in milliseconds and the callback function is executed after the effect is complete. The toggle() method is very practical for buttons that must display or hide content alternately.
Key points
- Hiding the elements, showing them back.
- It's a tradeoff between hidden and visible.
- The first parameter can be a duration number or keywords like slow and fast
- The second parameter can be a callback function.
- This effect changes the display property of the element
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.