Top "Dom-traversal" questions

The process of traversing the Document Object Model (DOM) tree and finding nodes based on certain criterion.

jQuery append and remove dynamic table row

I can add many rows for a table, but I can't remove many rows. I only can remove 1 row per …

javascript jquery html-table tablerow dom-traversal
Jquery find nearest matching element

I have a series of rows with columns and I want to select the value of an input field that …

jquery dom-traversal
How to select a single child element using jQuery?

Using jQuery how do I select a single child element? I've looked at the Traversing API and know I can …

javascript jquery dom-traversal
What do querySelectorAll and getElementsBy* methods return?

Do getElementsByClassName (and similar functions like getElementsByTagName and querySelectorAll) work the same as getElementById or do they return an array …

javascript getelementsbyclassname dom-traversal
How to select a li with a specific class?

<ul id="attached_deals_tab" class="nav nav-tabs"> <li class="active"> <a data-toggle="tab" href="#…

jquery jquery-selectors dom-traversal
Removing an element after a div with Jquery

I would like to remove the p tag that directly follows a div using jquery. Here is my HTML: <…

jquery jquery-selectors dom-traversal
jQuery - Check if the tag's content is equal to sometext then do something

Let's say I have many of these in my content div : <cite class="fn">blabla</cite> …

javascript jquery dom jquery-selectors dom-traversal
How to find <script> elements with particular value of "type" attribute?

Assuming the following script tag in a random HTML document: <script id="target" type="store"> //random JavaScript code …

jquery jquery-selectors dom-traversal
getElementsByClassName() doesn't work in old Internet Explorers like IE6, IE7, IE8

The following code: var borderTds = document.getElementsByClassName('leftborder'); gives me an error message in Internet Explorer 6, 7 and 8: Object does not …

javascript internet-explorer-8 internet-explorer-7 internet-explorer-6 dom-traversal
Is there a way to combine $(this) with :nth-child?

I'm in the middle of an .each iteration and wanted to call out the 2nd or 3rd child for the …

jquery jquery-selectors dom-traversal