Despite our warnings about the horrors of pregnancy, childbirth, and babies, some of you are still destined to become parents, if you haven't done it already. Congratulations! Now prepare to be terrified, because you have no idea what you're about to face. And we're not even talking about that first diaper change.
jQuery has two usage styles: 1  Via the $ function, which is a factory method for the jQuery object. These functions, often called commands, are chainable as they all return jQuery objects. 2  Via $.-prefixed functions. These are utility functions, which do not act upon the jQuery object directly.
up vote 9 down vote. When you use jQuery to obtain an DOM element, the jQuery object returns contains a reference to the element. When you use a native function like getElementById, you get the reference to the element directly, not contained within a jQuery object. A jQuery object is an array-like object that can contain multiple DOM elements: The above line could be performed without jQuery: In fact, that's exactly what jQuery will do internally when you pass in a simple selector like div. You can access the actual elements within a jQuery collection using the get method: