jQuery Selectors Reference
Last Updated Jul 18, 2015, 05:05:26 PM
jQuery Selectors Reference
The following table lists all the jQuery Selectors
Method | Description | Example |
---|---|---|
Universal | universal selector is used to select all HTML elements on the webpage |
Try It |
id | id selector uses the id attribute of a HTML tag to find the specific element on the webpage. |
Try It |
class | class selector is used to find all the elements which has same class name |
Try It |
this | this selector is used to select the current HTML element and apply the required styles |
Try It |
even | even selector is used to select only the even HTML elements on the webpage |
Try It |
odd | odd selector is used to select only the odd HTML elements on the webpage |
Try It |
multiple | multiple selector is used to target multiple HTML elements at a time and apply the required styles |
Try It |
eq | :eq selector is used to select the element with a specific index within the matched set |
Try It |
first | first selector selects the first matched element in the given list of HTML elements |
Try It |
last | last selectorselects the last matched element in the given list of HTML elements |
Try It |
gt | :gt selector is used to select all elements which are greater than the given index |
Try It |
lt | lt selectoris used to select all elements which are less than the given index. |
Try It |
first-child | first-child selector is used to select all the HTML elements which are the first child of their parent |
Try It |
last-child | last-child selector is used to select all the last-child elements of its parent. |
Try It |
first-of-type | :first-of-type selector used to select the first of type element if there are more than one element in the same parent |
Try It |
last-of-type | :last-of-type selector matches elements that have no other element with both the same parent and the same element name coming before it in the document tree. |
Try It |
nth-child | Matches all elements that are the nth-child of their parent or that are the parent's even or odd children. |
Try It |
contains | contains selector selects all elements which contains the specified text in HTML |
Try It |
empty | empty selector selects all HTML elements that have no children |
Try It |
has | has selector , Selects elements the HTML elements which contain at least one element that matches the specified selector |
Try It |
parent | parent selector is used to select the elements which has at least one child element |
Try It |
Other jQuery Selectors you might want to learn
jQuery Selectors
jQuery Basic Selectors
jQuery Child Selectors
jQuery Content Filter Selectors
Sources and Credits
The content and methods in the tutorial has been referred and updated with jQuery API and The jQuery Foundation
Last Updated Jul 18, 2015, 05:05:26 PM
Recommanded Premium jQuery Online Courses
Learning 200 jQuery Functions with 800 Examples -Udemy
Learn jQuery in One Month - from OneMonth
The Ultimate Web Development Course -Udemy
Learn jQuery: An In-depth Course For Beginners -Udemy
Learning 200 jQuery Functions with 800 Examples -Udemy
Learn jQuery in One Month - from OneMonth
The Ultimate Web Development Course -Udemy
Learn jQuery: An In-depth Course For Beginners -Udemy