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

Submitted by: Muhammad
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.
Submitted by: Muhammad

Read Online Web Development Ninjas Job Interview Questions And Answers