.hide()
Published Aug 4, 2022Updated Aug 4, 2022
Contribute to Docs
The .hide()
method hides an HTML element.
Syntax
$(selector).hide(speed, callback);
selector
: Specifies the elements that will be hidden.speed
(optional): Can be “slow” or “fast” or the number of milliseconds.callback
(optional): A function that is called once the element is hidden.
Example
The following jQuery code will hide the element selected with #hide
when it is clicked:
$("#hide").click(function() {$("#hide").hide();});
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.