Tuesday, May 27, 2014

Hide all elements using Jquery

1) <script>
$(document).ready(function(){
  $("button").click(function(){
    $("*").hide();
  });
});
</script>

2) <h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>

3) It will hide all elements

No comments:

Post a Comment