jQuery.contains()

Check to see if a DOM element is a descendant of another DOM element. The $.contains() method returns true if the DOM element provided by the second argument is a descendant of the DOM element provided by the first argument, whether it is a direct child or nested more deeply. Otherwise, it returns false. Only element nodes are supported; if the second argument is a text or comment node, $.contains() will return false. Note: The first argument must be

:odd selector

Selects odd elements, zero-indexed. See also even. In particular, note that the 0-based indexing means that, counter-intuitively, :odd selects the second element, fourth element, and so on within the matched set. Because :odd is a jQuery extension and not part of the CSS specification, queries using :odd cannot take advantage of the performance boost provided by the native DOM querySelectorAll() method. To achieve the best performance when using :odd

event.preventDefault()

If this method is called, the default action of the event will not be triggered. For example, clicked anchors will not take the browser to a new URL. We can use event.isDefaultPrevented() to determine if this method has been called by an event handler that was triggered by this event. event.preventDefault() version added: 1.0

Table

Creates a responsive table Responsive tables One of the biggest challenges in responsive web design (RWD) is presenting tabular data. Large tables with lots of columns don't fit on smaller screens and there isn't a simple way to re-format the table content with CSS and media queries for an acceptable presentation. To address this, the framework offers two different options for presenting tables responsively. Each has benefits and tradeoffs, the

.wrapAll()

Wrap an HTML structure around all elements in the set of matched elements. The .wrapAll() function can take any string or object that could be passed to the $() function to specify a DOM structure. This structure may be nested several levels deep, but should contain only one inmost element. The structure will be wrapped around all of the elements in the set of matched elements, as a single group. Consider the following HTML: <div class="container"&

:last-of-type selector

Selects all elements that are the last among siblings of the same element name. The :last-of-type selector matches elements that have no other element with the same parent and the same element name coming after it in the document tree. jQuery( ":last-of-type" ) version added: 1.9 Examples: F

Textinput

Creates a textinput widget for textinput, textarea or search input Text Input Text inputs and textareas are coded with standard HTML elements, then enhanced by jQuery Mobile to make them more attractive and useable on a mobile device. To collect standard alphanumeric text, use an input with a type="text" attribute. Set the for attribute of the label to match the id of the input so they are semantically associated. It's possible to accessibly hi

.toggleClass()

Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument. This method takes one or more class names as its parameter. In the first version, if an element in the matched set of elements already has the class, then it is removed; if an element does not have the class, then it is added. For example, we can apply .toggleClass() to a simple <div>:

.disableSelection()

Disable selection of text content within the set of matched elements. Disabling text selection is bad. Don't use this. .disableSelection() version added: 1.6, deprecated: 1.9 This method does not accept any arguments.

.submit()

Bind an event handler to the "submit" JavaScript event, or trigger that event on an element. This method is a shortcut for .on( "submit", handler ) in the first variation, and .trigger( "submit" ) in the third. The submit event is sent to an element when the user is attempting to submit a form. It can only be attached to <form> elements. Forms can be submitted either by clicking an explicit <input type="submit">, <input type="image">