Working Example of jQuery

The purpose of jQuery is to make it much easier to use JavaScript on your website.

by Mohan Ahuja

HTML

<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<button>
  Hide Paragraph's
</button>
<p>
  I am in paragraph 1
</p>
<p>
  I am in paragraph 2
</p>

JavaScript

$(document).ready(function(){
  $("button").click(function(){
    $("p").hide();
  });
});