concept collection in category jQuery

appears as: collection, collection, collections, A collection
jQuery in Action, Third Edition

This is an excerpt from Manning's book jQuery in Action, Third Edition.

The most common use of jQuery() is to select elements from the DOM so you can apply some changes to them. In this case, it accepts two parameters: a selector and (optionally) a context. This function returns an object containing a collection of DOM elements that match the given criteria. But what’s a selector?

Function syntax: $.each

$.each(collection, callback)
A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function’s arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties.
Parameters
collection (Array|Object) An array (or array-like object) whose items are to be iterated over, or an object whose properties are to be iterated over.
callback (Function) A function invoked for each element in the collection. If the collection is an array (or array-like object), this callback is invoked for each array item; if it’s an object, the callback is invoked for each object property. The first parameter to this callback is the index of the array element or the name of the object property. The second parameter is the array item or property value. The function context (this) of the invocation is also set to the value passed as the second parameter.
Returns
The same collection passed.
Extending jQuery

This is an excerpt from Manning's book Extending jQuery.

In this book I explain how you can extend various aspects of jQuery to provide greater reuse and easier maintenance of your code. Alongside the standard plugin that operates on a collection of elements on a web page, you can create custom selectors, utility functions, custom animations, enhanced Ajax processors, custom events, and validation rules. I cover testing, packaging, and documenting your code to make sure that others can make maximum use of it as well.

Collection plugins

Collection plugins are functions that you can apply to collections of elements as retrieved by a selector. These functions are what most people think of when the term jQuery plugin is used, and they make up the largest portion of the available third-party plugins. The new abilities supplied by a collection plugin are only limited by your imagination and can range from making simple attribute changes, through behavioral changes from monitoring events on those elements, to completely replacing the original component with an alternate implementation.