What are selectors in jQuery and how many types of selectors are there?
Answer Posted / chaitanya
To work with an element on the web page, first we need to find them. To find the html element in jQuery we use selectors. There are many types of selectors but basic selectors are:
Name: Selects all elements which match with the given element Name.
#ID: Selects a single element which matches with the given ID
.Class: Selects all elements which match with the given Class.
Universal (*): Selects all elements available in a DOM.
Multiple Elements E, F, G: Selects the combined results of all the specified selectors E, F or G.
Attribute Selector: Select elements based on its attribute value.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to get attributes of an element using jQuery?
Which are the fastest selectors in jquery? : jquery mobile
How to use it jquery knockout?
How to find all sibling elements after the current element using ?
How to add and remove css classes to an element using ?
Why do we need to go for JQuery?
Explain the difference between parent() and parents() methods in jquery? : jquery mobile
How to stop jqm from auto-enhancing an element? : jquery mobile
Difference between document.ready() and body onload()?
Explain all the ways to include jquery in a page?
Define the use jquery.data method?
What is the minimum setup needed to start using jquery.
Explain the use of jquery .each() function? : jquery mobile
What is the difference between map and grep function in jquery?
How do you disable or enable a form element?