Chapter 6. Beyond the DOM with jQuery utility functions
This chapter covers
- The jQuery browser support information
- Using other libraries with jQuery
- Array manipulation functions
- Extending and merging objects
- Dynamically loading new scripts
- And more ...
Up to this point, we’ve spent a fair number of chapters examining the jQuery methods that operate upon a set of DOM elements wrapped by the $() function. But you may recall that, way back in chapter 1, we also introduced the concept of utility functions—functions namespaced by jQuery/$ that don’t operate on a wrapped set. These functions could be thought of as top-level functions except that they’re defined on the $ instance rather than window, keeping them out of the global namespace.
Generally, these functions either operate upon JavaScript objects other than DOM elements (that’s the purview of the wrapper methods, after all), or they perform some non-object-related operation (such as an Ajax request).
In addition to functions, jQuery also provides some useful flags that are defined within the jQuery/$ namespace.
You may wonder why we waited until this chapter to introduce these functions and flags. Well, we had two reasons: