deferred.done()

Add handlers to be called when the Deferred object is resolved. The deferred.done() method accepts one or more arguments, all of which can be either a single function or an array of functions. When the Deferred is resolved, the doneCallbacks are called. Callbacks are executed in the order they were added. Since deferred.done() returns the deferred object, other methods of the deferred object can be chained to this one, including additional .done() met

deferred.state()

Determine the current state of a Deferred object. The deferred.state() method returns a string representing the current state of the Deferred object. The Deferred object can be in one of three states: "pending": The Deferred object is not yet in a completed state (neither "rejected" nor "resolved"). "resolved": The Deferred object is in the resolved state, meaning that either deferred.resolve() or deferred.resolveWith() has been called for the objec

.slideDown()

Display the matched elements with a sliding motion. The .slideDown() method animates the height of the matched elements. This causes lower parts of the page to slide down, making way for the revealed items. Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The strings 'fast' and 'slow' can be supplied to indicate durations of 200 and 600 milliseconds, respectively. If any other string is supplied, or if th

Configuring Defaults

Configuring Defaults Working with jQuery Mobile's Auto-initialization Unlike other jQuery projects, such as jQuery and jQuery UI, jQuery Mobile automatically applies many markup enhancements as soon as it loads (long before the document.ready event fires). These enhancements are applied based on jQuery Mobile's default settings, which are designed to work with common scenarios. If changes to the settings are needed, they are easy to configure. The mobileinit event When jQuery Mobile starts, it

.jqmEnhanceable()

Filter method to respect data-enhance=false parent elements during manual enhancement. For users that wish to respect data-enhance=false parent elements during manual enhancement or custom plugin authoring jQuery Mobile provides the $.fn.jqmEnhanceable filter method. Settings: If, and only if, $.mobile.ignoreContentEnabled is set to true, this method will traverse the parent nodes for each DOM element in the jQuery object and where it finds a

.replaceAll()

Replace each target element with the set of matched elements. The .replaceAll() method is similar to .replaceWith(), but with the source and target reversed. Consider this DOM structure: <div class="container"> <div class="inner first">Hello</div> <div class="inner second">And</div> <div class="inner third">Goodbye</div> </div> We can create an element, then replace other elements with it: $( "<

jQuery.inArray()

Search for a specified value within an array and return its index (or -1 if not found). The $.inArray() method is similar to JavaScript's native .indexOf() method in that it returns -1 when it doesn't find a match. If the first element within the array matches value, $.inArray() returns 0. Because JavaScript treats 0 as loosely equal to false (i.e. 0 == false, but 0 !== false), to check for the presence of value within array, you need to check if it's

.prepend()

Insert content, specified by the parameter, to the beginning of each element in the set of matched elements. The .prepend() method inserts the specified content as the first child of each element in the jQuery collection (To insert it as the last child, use .append()). The .prepend() and .prependTo() methods perform the same task. The major difference is in the syntaxâspecifically, in the placement of the content and target. With .prepend(), the sele

jQuery.grep()

Finds the elements of an array which satisfy a filter function. The original array is not affected. The $.grep() method removes items from an array as necessary so that all remaining items pass a provided test. The test is a function that is passed an array item and the index of the item within the array. Only if the test returns true will the item be in the result array. The filter function will be passed two arguments: the current array item and it

Selectable

Use the mouse to select elements, individually or in a group. The jQuery UI Selectable plugin allows for elements to be selected by dragging a box (sometimes called a lasso) with the mouse over the elements. Elements can also be selected via click or drag while holding the ctrl/meta key, allowing for multiple (non-contiguous) selections. Dependencies UI Core Widget Factory Mouse Interaction This widget requires some functional CSS, otherwise it won