JQuery Traversing inside div's <pre><code>&lt;div class="tasksMobile" id="headerDTMobile2"&gt; &lt;div class="divSubTaskMobile" id="divDefaultTask4"&gt; &lt;div class="divSubTaskMobile" id="divDefaultTask3"&gt; &lt;div class="divSubTaskMobile" id="divDefaultTask2"&gt; &lt;div class="tasksMobile" id="headerDTMobile3"&gt; </code></pre> <p>This query does not give html of three <code>&lt;div&gt;</code> elements inside of <code>#headerDTMobile2</code>:</p> <pre><code>$("#headerDTMobile2").nextUntil(".tasksMobile").html() </code></pre>