Using jQuery

As of Drupal version 5.0, most of what can be achieved with Javascript will be made possible by the jQuery Javascript library. To quote from the jQuery website:

jQuery is a new type of Javascript library. It is not a huge, bloated framework promising the best in AJAX - nor is it just a set of needlessly complex enhancements - jQuery is designed to change the way that you write Javascript.

Note: Most information about jQuery can and should be obtained from the jQuery website, this section of the handbook will avoid duplicating information better maintained there.

Resources on the web:

jquery doc link is for 1.2 - drupal isn't there yet

tatere@drupal.org - May 3, 2008 - 19:55

For other complete newcomers to the subject, a warning:

The documentation at docs.jquery.com - the site linked to by 'jQuery documentation' above - is for the current release of jQuery.

Drupal is very much not running the current release - Drupal 5.x particularly isn't. As best as I can tell, the current production release of 5.x includes jQuery 1.0.4. There are ways to upgrade that, but it seems that 1.1.3 is as far forward as you can go without compatibility problems.

Any links to documentation of the actual jQuery code we are running would be good to include here. I have found one that is helpful:

http://docs.jquery.com/API/1.1.2/DOM/Traversing/Selectors

 
 

Drupal is a registered trademark of Dries Buytaert.