jquery Traversing descendants

using jquery methods you can traverse down the dom(document object model) tree to find descendants of an element.a descendants is a great-grandchild, grandchild, child and so on.

the jquery provide two usefull methods for traversing down the dom tree

  • jquery children() method
  • jquery find() method

jquery children() method

the .children() method get the children of each specified selected elements.

the jquery children method syntax :-

(selector).children (selector )
selectorrequired. specifies a selector to match elements against.

the jquery children method example