jQuery Tutorials
jQuery Effects
jQuery HTML
jQuery Traversing
jQuery AJAX
jQuery Misc
With jQuery, you can hide and display HTML elements in hide()
and show()
modes:
Syntax
Optional speed parameter specifies hide / show speed, and may take the following values: "slow", "fast", or milliseconds.
The optional dialing parameter is a function to be used after the completion of call hide()
or show()
(you will learn more about callback functions in the next chapter).
The following example shows a speed parameter with hide()
:
You can also switch between hiding and displaying something in a toggle()
way.
Featured elements are hidden and hidden features are displayed:
Syntax
$(selector).toggle(speed,callback);
Optional speed parameter can take the following values: "slow", "fast", or milliseconds.
Optional call parameter is a function to be used after the completion of toggle()
.