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


Please Help Members By Posting Answers For Below Questions

How to read, write and delete cookies in jquery?

450


How we can select multiple elements in jquery?

490


Can you write a code to select all links inside the paragraph?

520


Explain the script build up by jquery?

8902


Why use jQuery filter() Methods?

518






Explain various methods to make ajax request in jquery?

431


What are the paremeter of jquery ajax method?

448


How does the jQuery pushStack function work?

545


What is a cdn? : jQuery Mobile

482


How do you select an item using css class or id and get the value by use of jquery.

475


How can you disable jquery animation?

447


Mention some advantages of jquery.

519


How can you use a jquery library in your project?

462


Explain chaining in jquery? : jquery mobile

491


What are the different types of selectors?

470