jQuery Basic Selectors Reference

Last Updated Jul 21, 2015, 12:00:06 PM





jQuery Basic Selectors Reference

The following table lists all the jQuery Basic 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
multiple multiple selector is used to target multiple HTML elements at a time and apply the required styles Try It
even even selector is used to select only the even HTMLelements on the webpage Try It
odd odd selector is used to select only the odd HTMLelements on the webpage Try It
this this selector is used to select the current HTML element and apply the required styles 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

Other jQuery Selectors you might want to learn


jQuery 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 21, 2015, 12:00:06 PM