Published Aug 4, 2022Updated Aug 4, 2022
Contribute to Docs

The .hide() method hides an HTML element.


$(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.


The following jQuery code will hide the element selected with #hide when it is clicked:

$("#hide").click(function() {

All contributors

Looking to contribute?

Learn JavaScript on Codecademy