background preloader

jQuery

Facebook Twitter

Deferred Object. Add handlers to be called when the Deferred object is either resolved or rejected. Add handlers to be called when the Deferred object is resolved. Add handlers to be called when the Deferred object is rejected. Determine whether a Deferred object has been rejected. Determine whether a Deferred object has been resolved. Call the progressCallbacks on a Deferred object with the given args. Call the progressCallbacks on a Deferred object with the given context and args. Utility method to filter and/or chain Deferreds.

Add handlers to be called when the Deferred object generates progress notifications. Return a Deferred’s Promise object. Reject a Deferred object and call any failCallbacks with the given args. Reject a Deferred object and call any failCallbacks with the given context and args. Resolve a Deferred object and call any doneCallbacks with the given args. Resolve a Deferred object and call any doneCallbacks with the given context and args. Determine the current state of a Deferred object. jQuery.ajax. Description: Perform an asynchronous HTTP (Ajax) request. The $.ajax() function underlies all Ajax requests sent by jQuery. It is often unnecessary to directly call this function, as several higher-level alternatives like $.get() and .load() are available and are easier to use. If less common options are required, though, $.ajax() can be used more flexibly.

At its simplest, the $.ajax() function can be called with no arguments: Note: Default settings can be set globally by using the $.ajaxSetup() function. This example, using no options, loads the contents of the current page, but does nothing with the result. To use the result, you can implement one of the callback functions. The jqXHR Object The jQuery XMLHttpRequest (jqXHR) object returned by $.ajax() as of jQuery 1.5 is a superset of the browser's native XMLHttpRequest object. Deprecation Notice: The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callbacks are deprecated as of jQuery 1.8. Callback Function Queues Data Types.

Select MenusChoose one...Choose one...Choose optionsChoose options. Select Menus Home Select menus The select menus are driven off native select elements, but the native selects are hidden from view and replaced with a custom-styled select button that matches the look and feel of the jQuery Mobile framework. The replacement selects are ARIA-enabled and are keyboard accessible on the desktop as well.

When the select button is clicked, the native select menu picker for the OS will open. To add a select widget to your page, start with a standard select element populated with a set of option elements. The framework will find all select elements and automatically enhance them into the custom select menus. <div data-role="fieldcontain"><label for="select-choice-1" class="select">Choose shipping method:</label><select name="select-choice-1" id="select-choice-1"><option value="standard">Standard: 7 day</option><option value="rush">Rush: 3 days</option><option value="express">Express: next day</option><option value="overnight">Overnight</option></select></div> Close.

Create a new Fiddle - jsFiddle. jQuery source viewer.