Hide and Show and Element Using JQuery

You have a div tag you want to hide with the id “myElementID”.

<div id="myElementId">somecontent here</div>
<script>$("#myElementId").hide();</script>

You want to show that same div again.

<div id="myElementId">somecontent here</div>
<script>$("#myElementId").show();</script>

Don’t forget to include jquery on your page.

Leave a Reply

Your email address will not be published.