.show()

The .show() method shows a hidden HTML element.

Syntax

$(selector).show(speed, callback);
  • selector: Specifies the elements that will be shown.
  • speed(optional): Can be “slow” or “fast” or the number of milliseconds.
  • callback(optional): A function that is called once the element is displayed.

Example

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

$("#show").click(function() {
$("#hide").show();
});

Contributors

Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn JavaScript on Codecademy