Table of content
Basic knowledge of:
Or jump to this one to see examples of website which are using jQuery: http://www.awwwards.com/websites/jquery/
To implement jQuery to your website.
1. Copy and paste the following code snipet and paste it just before the end of your body tag in your HTML document.
----> The jQuery file that we are using is stored on a CDN contend delivery network (the internet). :)
The Document.Ready function ensures that all the jQuery actions that we want to perform on HTML elements are done only once the HTML document has fully loaded.
Otherwise the jQuery actions that you applied may not work since the elements on which these actions were supposed to occur, may not even have been fully created until the document has fully loaded.
Quick tip: With jQuery, we can select the HTML elements on which we want to perform an action.
1. Reference the jQuery library at just before the end of the body tag, by typing:
2. Right after the your jQuery reference code but just before end this tag: </body>, type:
alert("Watson, look at the sky and tell me what see.");
$(document).Ready ----> Once the HTML document has fully loaded.
"" ----> Message to be shown using the alert function needs to be quoted; "My Message".
; ----> Semicolon required to tell the system that its the end of the alert function.
- Cross browser compatibility.
- jQuery has rich ajax support
- jQuery has a large development communities support
- jQuery is extensible
- jQuery have countless free plugins such as the autocomplete plugin
- There is a excellent documentation for jQuery on its website.
- 1.x supports older web browsers whereas 2.x does not.