jQuery works by using functions, a library, written in JavaScript. You can use these functions to write powerful things without actually typing much code. jQuery is very lightweight and efficient so you don’t have to worry about it slowing down the user experience.
Referencing jQuery is extremely easy and there are multiple ways to do it. Remember that you can reference JavaScript from anywhere. You could even take the JavaScript that I am writing for this website and use it. The first way uses this principle. Google has a jQuery library available for all developers to use.
If you have a trust issue with Google, you can always download their library and reference it like you would any other JavaScript file. Download the JQuery Library
The Syntax Difference
The basic syntax of jQuery is written much like how you would reference an object’s method. In JavaScript, we would do this by document.write, where document is the object and write is the method. jQuery is similar, but we are using selectors instead of objects, and including a $ at the beginning.
The selector here is whatever we are referencing. It can be an HTML elements id, name, class, etc. You will have a better understanding of what I am talking about in the Selectors tutorial.
Yaaaay, jQuery!