← Back to Index

.hide()

Hide the matched elements.

Examples

1. Hide Element

$('.modal').hide();

Result

<div class="modal" style="display: none;">...</div>

Details

Sets `display: none`. It internally caches the previous display value so .show() can later restore the element to its original display type (block, flex, inline, etc.), rather than forcing `block`.

Returns: The original SR object for chaining.