Autocomplete

Autocomplete enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering. Any field that can receive input can be converted into an Autocomplete, namely, <input> elements, <textarea> elements, and elements with the contenteditable attribute. By giving an Autocomplete field focus or entering something into it, the plugin starts searching for entries that match and displays a

.prev()

Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector. Given a jQuery object that represents a set of DOM elements, the .prev() method searches for the predecessor of each of these elements in the DOM tree and constructs a new jQuery object from the matching elements. The method optionally accepts a selector expression of the same type that can be passed to the $() function. If the sele

.attr()

Get the value of an attribute for the first element in the set of matched elements. The .attr() method gets the attribute value for only the first element in the matched set. To get the value for each element individually, use a looping construct such as jQuery's .each() or .map() method. Using jQuery's .attr() method to get the value of an element's attribute has two main benefits: Convenience: It can be called directly on a jQuery object and chaine

jQuery.mobile.loadPage()

Load an external page, enhance its content, and insert it into the DOM. Load an external page, enhance its content, and insert it into the DOM. This method is called internally by the changePage() function when its first argument is a URL. This function does not affect the current active page so it can be used to load pages in the background. The function returns a deferred promise object that gets resolved after the page has been enhanced and

Listview

Creates a listview widget Basic linked lists A listview is coded as a simple unordered list containing linked list items with a data-role="listview" attribute. jQuery Mobile will apply all the necessary styles to transform the list into a mobile-friendly listview with right arrow indicator that fills the full width of the browser window. When you tap on the list item, the framework will trigger a click on the first link inside the list item, is

Popup

Opens content in a popup. Popups To create a popup, add the data-role="popup" attribute to a div with the popup contents. Then create a link with the href set to the id of the popup div, and add the attribute data-rel="popup" to tell the framework to open the popup when the link is tapped. This is a similar markup pattern to the dialog widget. A popup div has to be nested inside the same page as the link. <a href="#popupBasic" data-rel="popu

.append()

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

.end()

End the most recent filtering operation in the current chain and return the set of matched elements to its previous state. Most of jQuery's DOM traversal methods operate on a jQuery object instance and produce a new one, matching a different set of DOM elements. When this happens, it is as if the new set of elements is pushed onto a stack that is maintained inside the object. Each successive filtering method pushes a new element set onto the stack. If

.load()

Bind an event handler to the "load" JavaScript event. This method is a shortcut for .on( "load", handler ). The load event is sent to an element when it and all sub-elements have been completely loaded. This event can be sent to any element associated with a URL: images, scripts, frames, iframes, and the window object. For example, consider a page with a simple image: <img src="book.png" alt="Book" id="book"> The event handler can be bound to th

.innerWidth()

Get the current computed inner width for the first element in the set of matched elements, including padding but not border. This method returns the width of the element, including left and right padding, in pixels. This method is not applicable to window and document objects; for these, use .width() instead. figure 1 The number returned by dimensions-related APIs, including .innerWidth(), may be fractional in some cases. Code should not assume it i