Apply jquery toggle function based on element structure
<p>Please I need to apply the <code>toggle()</code> function to only <code>li</code> that has <code>ul</code> has children in its structure.</p>

<p>For example</p>

<pre><code>&lt;div&gt;
    &lt;ul&gt;
        &lt;li&gt;
            &lt;a&gt;&lt;/a&gt;
            &lt;ul&gt;
                &lt;li&gt;&lt;/li&gt;
            &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;&lt;a&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>From the above my aim is to apply the <code>toggle()</code> function to the <code>a</code> element(s) that have no <code>ul</code> has a sibling.</p>

<p>How can I achieve this.</p>
