Lesson 1

Introduction to jQuery

What should you know?

Before you get started you should have a basic knowledge of HTML and CSS

What is jQuery?

Now you may be think jQuery you mean JavaScript right? Well you are on the right track jQuery is the work smarter not harder version of javascript and eliminates some of the more complicated things of JavaScript such as AJAX.

What can jQuery do for you?

jQuery can do things JavaScript did such as:

  1. HTML/DOM manipulation
  2. CSS manipulation
  3. HTML event methods
  4. Effects and Animations
  5. AJAX

and many more things!

Getting Started

How does one go about adding jQuery to their web pages?

Now you must be sitting there at this point thinking "How can I, A humble common folk aquire this majestic thing known as jQuery?" Well its easy as downloading the jQuery library from jQuery.com. Now to add it to your site you simply add a script tag and link the version of jQuery as the source. Example Below

1

Versions

Now there are two version of jQuery avaliable to you there is the production version which is for the live site due to its compressed nature and the development verions whihc is for testing and hashing out your website.

jQuery Syntax and Document Ready

jQuery Syntax and you

The jQuery Syntax has been specifically made to select individual HTML element and preform an action on the elements. A basic syntax statment would look something like $(selector).action() which specifies an item for the query to select or find. The $ repersents the acces of jQuery. And the action() shows what the query is going to actually do.

Document Ready

The document ready event is what prevents the jQuery from running without the document being fully load aka running before the document is ready.

Here is an example of the document ready statment.

2

Now you are prepared to enter the world of jQuery!