Tuesday, 23 July 2013

jQuery Selectors

jQuery selectors is most important aspects of the jQuery library. jQuery library allow you to select elements in your HTML document by wrapping them in $(" ") (also you have to use single quotes), which is the jQuery wrapper. Selectors are useful and required at every step while using jQuery.
jQuery Selector Syntax
jQuery offers a powerful set of selector operations, which can be used like wild cards to identify specific elements in a page.  

Selector 
Description
TagName
Selects all element match of given elements.
this
Selects current elements.
#ID
Selects element whose id is match of given elements.
.CLASS
Selects element whose class is match of given elements.
Selects all elements in the document.