jQuery is a framework designed for front end development (user facing) and is built on top of JavaScript. It does not replace JavaScript. jQuery sits on top of JavaScript, and makes it easier to work with, especially where the browsers do things differently.
You must include the jQuery framework in any HTML file you want to reference. It can be downloaded from the website http://jquery.com
jQuery can be called using the “$()” or jquery(). Inside the parentheses, you select an element using CSS selections. Examples:
- $(‘#header’)
- $(‘.content’)
- $(‘p’)
- $(‘.content p’)
Once the element(s) have been selected you can modify the element.
Common things to change an element are:
- adding/removing a CSS class
- Defining CSS styles
- changing the HTML/Text content of the element
You can also attach event handlers to the elements. Examples would be:
- click
- change
- hover
An Introduction to JQuery was originally found on Access 2 Learn