jQuery constants are actually private properties used throughout the library. They're as follows:
// Map over jQuery in case of overwrite _jQuery = window.jQuery, // Map over the $ in case of overwrite _$ = window.$, // Use the correct document accordingly with window argument (sandbox) document = window.document, // A central reference to the root jQuery(document) rootjQuery, // A simple way to check for HTML strings or ID strings // (both of which we optimize for) quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/, // Is it a simple selector isSimple = /^.[^:#\[\.,]*$/, // Check if a string has a non-whitespace character in it rnotwhite = /\S/, // Used for trimming whitespace rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g, // Match a standalone tag rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, // Keep a UserAgent string for use with jQuery.browser userAgent = navigator.userAgent, // For matching the engine and version of the browser browserMatch, // Has the ready events already been bound? readyBound = false, // The functions to execute on DOM ready readyList = [], // The ready event handler DOMContentLoaded, // Save a reference to some core methods toString = Object.prototype.toString, hasOwnProperty = Object.prototype.hasOwnProperty, push = Array.prototype.push, slice = Array.prototype.slice, indexOf = Array.prototype.indexOf;
- _jQuery – serves as an internal reference to the jQuery wrapper
- _$ – creates an internal reference to the jQuery alias
$
- document – is a link to the
document
object; it uses thewindow.document
notation to avoid scope problems - rootjQuery – is a reference to the root jQuery, that is, the whole
document
object - quickExpr – is a regular expression used to match against HTML strings and ID; note that jQuery makes use of regular expressions to implement its internal element selection based on CSS selectors
- isSimple – a regular expression that matches a simple selector
- rnotwhite, rtrim – handle white-space
- rsingleTag – matches a standalone HTML tag
- userAgent – a reference to the
navigator.userAgent
property - browserMatch – matches the engine and version of the browser
- readyBound – a boolean value used to check if a
ready
event has already been triggered - readyList – an array that contains a list of functions to be initialized when the DOM is ready
- DOMContentLoaded – see https://developer.mozilla.org/en/Gecko-Specific_DOM_Events
- toString, hasOwnProperty, push, slice, indexOf – a reference to JavaScript core methods that will be overwritten.