Grid Layout

Multi-column layout grids Using multiple column layouts isn't generally recommended on a mobile device because of the narrow screen width, but there are times where you may need to place small elements side-by-side (like buttons or navigation tabs, for example). The jQuery Mobile framework provides a simple way to build CSS-based columns through a block style class convention called ui-grid. There are four preset layouts that can be used in an

.dblclick()

Bind an event handler to the "dblclick" JavaScript event, or trigger that event on an element. This method is a shortcut for .on( "dblclick", handler ) in the first two variations, and .trigger( "dblclick" ) in the third. The dblclick event is sent to an element when the element is double-clicked. Any HTML element can receive this event. For example, consider the HTML: <div id="target"> Double-click here </div> <div id="other"> T

.parent()

Get the parent of each element in the current set of matched elements, optionally filtered by a selector. Given a jQuery object that represents a set of DOM elements, the parent() method traverses to the immediate parent of each of these elements in the DOM tree and constructs a new jQuery object from the matching elements. This method is similar to .parents(), except .parent() only travels a single level up the DOM tree. Also, $( "html" ).parent() me

.children()

Get the children 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 .children() method allows us to search through the children of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .children() method differs from .find() in that .children() only travels a single level down the DOM tree while .find() can traver

:input selector

Selects all input, textarea, select and button elements. The :input selector basically selects all form controls. Because :input is a jQuery extension and not part of the CSS specification, queries using :input cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method. To achieve the best performance when using :input to select elements, first select the elements using a pure CSS selector, then use .filter(":

CSS framework

CSS Framework The following is a list of the class names used by jQuery UI. The classes are designed to create a visual consistency across an application and allow components to be themeable by jQuery UI ThemeRoller. The class names are split between ui.core.css and ui.theme.css, depending on whether styles are fixed and structural, or themeable (colors, fonts, backgrounds, etc) respectively. Layout Helpers .ui-helper-hidden: Hides content visually and from assistive technologies, such as scr

.closest()

For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. Given a jQuery object that represents a set of DOM elements, the .closest() method searches through these elements and their ancestors in the DOM tree and constructs a new jQuery object from the matching elements. The .parents() and .closest() methods are similar in that they both traverse

.index()

Search for a given element from among the matched elements. Return Values If no argument is passed to the .index() method, the return value is an integer indicating the position of the first element within the jQuery object relative to its sibling elements. If .index() is called on a collection of elements and a DOM element or jQuery object is passed in, .index() returns an integer indicating the position of the passed element relative to the original

:nth-last-of-type() selector

Selects all the elements that are the nth-child of their parent in relation to siblings with the same element name, counting from the last element to the first. Because jQuery's implementation of :nth- selectors is strictly derived from the CSS specification, the value of n is "1-indexed", meaning that the counting starts at 1. For other selector expressions such as :eq() or :even jQuery follows JavaScript's "0-indexed" counting. Given a single <ul

Button

Themeable buttons. Button enhances standard form elements like buttons, inputs and anchors to themeable buttons with appropriate hover and active styles. In addition to basic push buttons, radio buttons and checkboxes (inputs of type radio and checkbox) can be converted to buttons. Their associated label is styled to appear as the button, while the underlying input is updated on click. For the association to work properly, give the input an id attribu