How to append this span if the LI element is parent AND has UL (children or submenu)
<p>I basically want to add arrow if the mousehover my navigation. But two rules should apply:</p>

<ol>
<li>It has to be the TOP parent (I already resolve that in the code)</li>
<li>It has to have CHILD elements (UL) submenu, etc. (Which is the problem!)</li>
</ol>

<p>I can not, no matter what I do get it to only show after conditional if to check if it has children first. Now both links which contaain children, and which not show the arrow.. Please help me.</p>

<p>My code:</p>

<pre><code>$("#menu ul").css({display: "none"}); // Opera Fix
$("#menu li").hover(function(){
    if (($(this).parent().attr("id") == 'menu')) {
    $(this).append('&lt;span class="arrow"&gt;&lt;/span&gt;');
    }
    $(this).find('ul:first').css({visibility: "visible",display: "none"}).slideToggle(500);
},function(){
    if ($(this).parent().attr("id") == 'menu') {
    $('.arrow').remove();
    }
    $(this).find('ul:first').css({visibility: "hidden"});
});
</code></pre>

<p>Problem: how to add &amp;&amp; conditional if to this.parent().attr("id") == 'menu which checks if the LI has children/sub UL</p>

<p>I tried $(this).next().is('ul') no luck! It still append all items with children, and without.</p>

<p>Need your input on this please.</p>
