Answers

Question and Answer:

  Home  JQuery Programmer

⟩ What are jQuery Selectors? Give some examples?

1. jQuery Selectors are used to select one or a group of HTML elements from your web page.

2. jQuery support all the CSS selectors as well as many additional custom selectors.

3. jQuery selectors always start with dollar sign and parentheses: $().

4. There are three building blocks to select the elements in a web document.

1) Select elements by tag name

Example : $(div)

It will select all the div elements in the document.

2) Select elements by ID

Example : $("#xyzid")

It will select single element that has an ID of xyzid.

3) Select elements by class

Example : $(".xyzclass")

It will select all the elements having class xyzclass.

 212 views

More Questions for you: