1.

What are the selectors in jQuery? How many types of selectors in jQuery?

Answer»

In order to work with any element on the web page, we would first need to find it. Selectors find the HTML elements in jQuery. Some of the most commonly used and basic selectors are:


  • Name: Used to select all elements which match the given element Name.

  • #ID: Used to select a single element which matches with the given ID

  • .Class: Used to select all elements which match with the given Class.

  • Universal (*): Used to select all elements available in a DOM.

  • Multiple Elements E, F, G: Used to select the combined results of all the specified selectors E, F or G.

  • Attribute Selector: Used to select elements based on their attribute value.




Discussion

No Comment Found