 <p>Assuming you only want to retrieve the <code>new content</code> value, and that it's always the first child element of <code>#div12Item</code>, then you can use the <code>childNodes</code> property, like this:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>console.log(document.getElementById('div12Item').childNodes[0].textContent.trim());</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div name="div12Item" id="div12Item"&gt; new content &lt;ul id="sortable"&gt; &lt;li&gt;Item 1&lt;/li&gt; &lt;li&gt;Item 2&lt;/li&gt; &lt;li&gt;Item 3&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;</code></pre> </div> </div> </p> <p>Or if you'd prefer to use jQuery, you can use <code>contents()</code>:</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>console.log($('#div12Item').contents().first().text().trim());</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div name="div12Item" id="div12Item"&gt; new content &lt;ul id="sortable"&gt; &lt;li&gt;Item 1&lt;/li&gt; &lt;li&gt;Item 2&lt;/li&gt; &lt;li&gt;Item 3&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;</code></pre> </div> </div> </p>