ubc
jquery.com
learn.jquery.com

Using the each() Method

Your typical jQuery object will contain references to any number of DOM elements, and that's why jQuery objects are often referred to as collections. If you want to do any manipulating with specific elements (e.g. getting a data attribute, calculating specific positions) then you need to use .each() to loop through the elements. $.fn.myNewPlugin = function() {
return this.each(function() {
// Do something to each element here.
});
};