The jQuery hide() method is used to hide the element which is selected by user.
Syntax-:$(selector).hide();
$(selector).hide(speed, callback);
$(selector).hide(speed, easing, callback);
Speed - It is an optional parameter which describe the speed of the delay to hide the current element.
Easing: It describe the easing function to be used for transition.
callback: It is also an optional parameter. It specifies the function to be called after completion of hide() effect.
Example of Code<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#hide").click(function(){
$("#jquery-hide-example").hide();
});
});
</script>
<p id="jquery-hide-example">If you click on the "Hide" button, I will disappear.</p>
<button id="hide">Hide</button>
Output
If you click on the "Hide" button, I will disappear.
