DOM - Traversal

> (World Wide) Web - (W3|WWW) > The Document Object Model W3C API Interface (DOM)

1 - About

traversal operations on the DOM.

3 - Example

3.1 - Jquery

Functions List:

$('selector')
    .parent()
    .parents() // Many
    .children()
    .find()
    .siblings()
  
* Log the text of each element

<p>Text from first p</p>
<p>Text from second p</p>
$('body > p').each( function(){
    console.log($(this).text()); 
})

Advertising
web/dom/traversal.txt ยท Last modified: 2019/02/09 11:41 by gerardnico