Skip to content

how to hide and show content using jquery?

Very basic example how to toggle on one button click. Lets try it. You will enjoy it.


<script src=”http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js” type=”text/javascript”></script>

<script type=”text/javascript”>
$(document).ready(function(){
    $("#btn").click(function () {
    $("p").toggle("fast");
  });
});
</script>

<button id="btn">Click Me</button>
<p>Hey I am here</p>

Tags: