Jquery check if a div contains a div with class on
<p>I have several divs inside another div.</p>

<p>I want to do an if statement which is true if a div inside the top div contains class on.</p>

<p>html</p>

<pre><code>&lt;div class="toDiv"&gt;
    &lt;div&gt;

    &lt;/div&gt;
    &lt;div class="on"&gt;

    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>jquery ..</p>

<pre><code>if ($(".toDiv").contains("on")){ ///do something}
</code></pre>
