I'll give it a shot explaining, feel free to correct me if I'm off. :) Basically, the jQuery core is broken up into three major pieces: * The Sizzle Selector Library * The jQuery Cache * The jQuery Namespace
The selector library, and code associated with implementing it, provides jQuery with a way to traverse the DOM Tree of a page. This is the most basic functionality of jQuery: Finding the DOM elements you want to work with. Now, once jQuery finds the DOMElement you want to do something to, it adds it to the jQuery Cache using an expando property. Lets say I use the following selector: $('#myElement'); Sizzle parses out the selector, and makes a call similar to document.getElementById('myElement'); Now, jQuery assigns an identifier to this element and sets it as a property of the DOMElement. If you use firefox and Firebug, you can inspect the element, and browse it's DOM properties, and you will come across a custom property named something like "jquery18203812379123". The numbers are merely a timestamp, and will change with every refresh of the page. The value of this "expando" will be something a simple integer, like "0" or "1" or "8". This value depends on when the element was accessed by jQuery. If you look at jQuery.Cache, you will see that it's an array, the id of which corresponds to the "expando" property value. So if "myElement" is the first element you accessed, it's expando ID would be "0", and it's accessible in the jQuery cache by calling jQuery.Cache [ 0 ]; The way jQuery works to add event handlers and custom "data" properties, is by adding them to the jQuery Cache object, instead of the actual element. The final piece of jQuery is its "namespace". All the functions which work on jQuery objects are methods of jQuery.fn. If you add a method to this object, it will be accessible as part of the jQuery chain: ex. jQuery.fn.myMethod = function(){ alert( this.attr('id') ); } $('#myElement').myMethod(); // Alerts "myElement" That's basically it, inasmuch as I'm concerned. :) Hope it was at least a little helpful. On May 5, 12:20 pm, Josh Powell <seas...@gmail.com> wrote: > Try this: > > http://www.learningjquery.com/category/levels/beginner?order=ascending > > On May 5, 9:08 am, kiusau <kiu...@mac.com> wrote: > > > On May 5, 8:24 am, Rey Bango <r...@reybango.com> wrote: > > > > Great advice Matt. > > > But, no source! > > > Roddy