Get div from div list with specific class
<p>I have <code>list</code> of <code>div</code> and want get <code>div</code> when contain specified class like <code>state-expanded</code>. For example I have got two different <code>divs</code>:</p>

<pre><code>&lt;div class="row-popular state-expanded no-sibling-group"&gt;
    &lt;span class="cell cell-id-name" style="flex: 1 1 63px;"&gt;
       &lt;span&gt;TEST&lt;/span&gt;
    &lt;/span&gt;
&lt;/div&gt;

&lt;div class="row-popular state-collapsed no-sibling-group"&gt;
    &lt;span class="cell cell-id-name" style="flex: 1 1 63px;"&gt;
       &lt;span&gt;OTHER&lt;/span&gt;
    &lt;/span&gt;
&lt;/div&gt;
</code></pre>

<p>First <code>div</code> have state <code>state-expanded</code> and second <code>state-collapsed</code>. 
I want get value of <code>span</code> where class in <code>div</code> is <code>state-expanded</code>.</p>

<p>This <code>list</code> declaration:</p>

<pre><code>var allDivs = document.getElementsByTagName('div');
</code></pre>

<p>In example as I write above, It should return value <code>TEST</code>. Please only <code>JavaScript</code> - not <code>jquery</code> etc.</p>

<p><strong>Any idea how get it?</strong></p>