Web Development Ninjas Question:
Download Job Interview Questions and Answers PDF
Suppose you have five <div> element in your page? How do you select them using jQuery?
Answer:
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.
Download Ninjas Web Developer Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain me why did you decide to add multiplayer to your game? Why Nextpeer? | Explain me difference between JavaScript window.onload event and jQuery ready function? |