.contents()

.contents()

.contents()Returns: jQuery

Description: Get the children of each element in the set of matched elements, including text and comment nodes.

  • version added: 1.2.contents()

    • This method does not accept any arguments.

Given a jQuery object that represents a set of DOM elements, the .contents() method allows us to search through the immediate c