jQuery Introduction
- jQuery improve the performance of website.
- jQuery can be run on most of browser.
- iQuery library contain HTML selections and manipulation.
- jQuery library contain CSS manipulation.
- By jQuery we can create effect and animation on website.
- It is an lightweight.
For work with jQuery we have to firstly add jquery library in our document
How to add jQuery library in document. In this example jquery.js is an external jquery library
<head> <script type="text/javascript" src="jquery.js"></script> </head> |
Example
In this we are using hide() method of jquery. After clicking on button message will be hide.
<html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function () { $("button").click(function () { $("p").hide(); }); }); </script> </head>
<body> <h3>My first program of jquery</h3> <p>Hello friends how are you</p> <button>Click</button> </body> </html> |
Output


Join the conversation! Your thoughts help the community grow.