jQuery Cheat Sheet

by i3 Quest Inc (i3quest) via cheatography.com/341/cs/168/
General * element .class #id Attributes [name] [name|="value"] Has Attribute Contains Prefix (before hyphen (-)) [name*="value"] [name~="value"] [name^="value"] [name$="value"] [name="value"] [name!="value"] [name="v"][name2="v2"] Controls :button :checkbox :submit :text :password :radio :reset :file :image :input Button Checkbox Submit Text Password Radio Reset File Image input, textarea, select and button elements Element State :checked :animated :disabled :enabled :focus :selected :visible :hidden Cheatographer i3 Quest Inc (i3quest) cheatography.com/i3quest/ www.i3quest.com Cheat Sheet This cheat sheet was published on 24th December, 2011 and was last updated on 24th December, 2011. Checked Animated Disabled Enabled Focused Selected Visible Hidden Sponsor Envoy , for simple and effective bug management. Try it free! http://www.envoyapp.com Contains Contains Word Starts With Ends With Equals Not Equal Multiple Attributes :empty :nth-child() :not(selector) :lt(n) All Element Class ID :eq(n) Functions :contains(text) Elements that contain the specified text. Element at index n within the matched set. :gt(n) Elements at an index greater than n within the matched set. Elements at an index less than index within the matched set. :has(selector) Elements which contain at least one element that matches the specified selector. Elements that do not match the given selector. Elements that are the nth-child of their parent. Elements that have no children (including text nodes). :even :first :header Even elements, zero-indexed. The first matched element. Elements that are headers, like h1, h2, h3 and so on. :last :odd The last matched element. Odd elements, zero-indexed. :parent :first-child prev ~ siblings ancestor descendant selector1, selector2, selectorN prev + next Next elements matching "next" that are immediately preceded by a sibling "prev". Sibling elements that follow after the "prev" element, have the same parent, and match the filtering "siblings" selector. Elements that are the first child of their parent. :last-child Elements that are the last child of their parent. :only-child Elements that are the only child of their parent. Elements that are the parent of another element, including text nodes. Hierarchy parent > child Direct child elements specified by "child" of elements specified by "parent". Elements that are descendants of a given ancestor. Combined results of all the specified selectors.

Sign up to vote on this title
UsefulNot useful