O'Reilly logo

jQuery Pocket Reference by David Flanagan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Utility Functions

These are miscellaneous jQuery functions and properties (not methods); see Chapter 7 for more details.

jQuery.boxModel

A deprecated synonym for jQuery.support.boxModel.

jQuery.browser

This property refers to an object that identifies the browser vendor and version. The object has the property msie for Internet Explorer, mozilla for Firefox, webkit for Safari and Chrome, and opera for Opera. The version property is the browser version number.

jQuery.contains(a,b):boolean

Returns true if document element a contains element b.

jQuery.data(elt):datajQuery.data(elt, key):valuejQuery.data(elt, data)jQuery.data(elt, key, value)

A low-level version of the data() method. With one element argument, return the data object for that element. With an element and a string, return the named value from that element’s data object. With an element and an object, set the data object for the element. With an element, string, and value, set the named value in the element’s data object.

jQuery.dequeue(elt, [qname="fx"])

Removes and invokes the first function in the named queue of the specified element. It is the same as $(elt).dequeue(qname).

jQuery.each(o, f(name,value)):ojQuery.each(a, f(index,value)):a

Invoke f once for each property of o, passing the name and value of the property and invoking f as a method of the value. If the first argument is an array or array-like object, invoke f as a method of each element in the array, passing the array index and element value as arguments. Iteration ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required