1.

What does the following code do?

Answer»
$( "div#firstDiv, div.firstDiv, ol#items > [name$='firstDiv']" )

  • The given code is an example of getting elements that satisfy multiple selectors at once. The function returns a jQuery object having the results of the query.

  • The given code does a query to retrieve those <div> element with the id value firstDiv along with all <div> elements that has the class value firstDiv and all elements that are children of the <ol id="items"> element and whose name attribute ends with the string firstDiv.




Discussion

No Comment Found