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
What is the use of jQuery.data() method?
Is it possible to use our own specific character in the place of $ sign in jquery? : jquery mobile
What is the use of the animate() method in jquery?
Explain how jquery works?
When can you use jquery?
What is the minimum setup needed to start using jquery.
What are the selectors in jquery? How many types of selectors in jquery?
What is the purpose of fadetoggle() method in jquery?
What is event preventdefault () and event stoppropagation () in jquery?
What does the jQuery migrate function do?
Why content injected into a page is not enhanced? : jquery mobile
What is the difference between text() and html() in jquery?
Tell me an example usage of jquery mobile? : jquery mobile
Explain data paremeter of jquery ajax method?
What is the difference between prop and attr?