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 are two different version of jquery library? : jquery mobile
How to use css() in jquery?
How to increase cursor size in html body using jquery?
Do you have plans for a new jquery plug-in or something else we should look out for? Where to from here for the imgpreview plugin?
How can images be made to appear scrolling one over another?
Difference between javascript and jquery?
what are the features of jquery
How to redirect to another page using jquery?
Write a code for the implementation of a module pattern.
What is the difference between $(this) and 'this' in jquery?
What are the advantages of using cdn?
Explain "beforesend(xhr)" paremeter of jquery ajax method?
Explain width() vs css(‘width’)?
Change the url for a hyperlink using jquery?
What programming language does jquery use?