jQuery Objects and Functions

The purpose of this page is to help the reader understand how jQuery works. When you load the jQuery code, you create the global jQuery function object into window.jQuery.This means that window jQuery serves as a function and also has properties that can be used like any other object. When the jQuery documentation refers to jQuery objects, it is referring to objects returned by the jQuery function.

The following code uses a JavaScript function that will create a table listing the properties possessed by an object. It can also list the properties for two objects side by side so that they can be compared. Click here to see information about the source code.

  1. The first column lists the properties of the window.jQuery object.
  2. The second column compares the properties of the window.jQuery.fn object and the object created by jQuery('p'). Note that the object created by jQuery contains a few additional properties that indicate the HTML elements that are to be processed. (These extra properties have numbers as the keys.)
  3. The final column lists the properties of the window global object.

This page then uses JavaScript to list the contents of the window.jQuery.fn.init() and window.jQuery() functions.

window.jQuery window.jQuery('p')
window.jQuery.fn
window

window.jQuery.fn.init function

window.jQuery function


Return to index page