Menu Close

Show / hide Functions using jQuery

Show / hide Functions using jQuery

With jQuery, you can use jQuery show/hide effect an HTML elements using the functions show() and hide(). The hide() function be used to hide some HTML element when some event occurs while show() can be used to display the hidden element.



The syntax contains the selector to access the HTML element and a show function that contains two optional parameters. The first parameter can be used to provide the speed of the effect in milliseconds.

The show() reverse the effect of hide() and display the element hidden by hide(). The hide() applies the display:none CSS to the HTML element when use the jquery function while show() applies the display:block CSS.

Check the example given below to find out the changes


<div class="para">The content to display jQuery show/hide function effect.</pdiv>
<button id="hide">Hide</button>
<button id="show">Show</button> 


<script src=""></script>      



Test for Show / hide Functions using jQuery

Posted in HTML, JavaScript, jQuery

You can also read...

Leave a Reply

Your email address will not be published. Required fields are marked *