Answers

Question and Answer:

  Home  Ninjas Web Developer

⟩ Suppose you have five <div> element in your page? How do you select them using jQuery?

Another fundamental jQuery question based on selector. jQuery supports different kinds of selector e.g. ID selector, class selector and tag selector. Since in this question nothing has been mentioned about ID and class, you can use the tag selector to select all div elements. jQuery code : $(“div”), will return a jQuery object contain all five div tags. For more detailed answer, see the article.

 141 views

More Questions for you: