problem with jquery Toggle
<p>I need small help with jquery.</p>

<p>EDIT:</p>

<pre><code>    echo "&lt;li&gt; ";
        echo $navi_menu-&gt;navi_name;
         echo "&lt;ul&gt;";
</code></pre>

<p>and the Jquery to it was,         </p>

<pre><code>&lt;script type="text/javascript"&gt;
            $(document).ready(function () {
                $("#nav li:has(ul)").click(function (event) {
                    if (this == event.target) {
                        $(this).toggleClass('clicked').children('ul').slideToggle();
                        $(this).find('li:has(ul)').removeClass('clicked').find("ul").slideUp();
                        $(this).siblings().removeClass('clicked').find("ul").slideUp();
                    }
                }).addClass('has_ul');

            });
        &lt;/script&gt;
</code></pre>

<p>This used to toggle up and down...now i have added a href tag in my html, instead of printing naviname(echo $navi_menu->navi_name;
) directly, i want a link to it. I need help to rewrite the jquery to accomdate a href wherever li tag comes....</p>

<pre><code>   echo "&lt;li&gt; ";
        echo "&lt;a class=\"click\" href=\"display_mod.php?navi_id=".$navi_menu-&gt;navi_id."\"&gt;$navi_menu-&gt;navi_name&lt;/a&gt;";
           switch($navi_menu-&gt;navi_id) {
            case 1:
                echo "&lt;ul&gt;";
</code></pre>

<p>and the jquery to it was,</p>

<pre><code>&lt;script type="text/javascript"&gt;
            $(document).ready(function () {
                $("#nav li:has(a.click):has(ul)").click(function (event) {
                    if (this == event.target) {
                        $(this).toggleClass('clicked').children('ul').slideToggle();
                        $(this).find('li:has(a.click):has(ul)').removeClass('clicked').find("ul").slideUp();
                        $(this).siblings().removeClass('clicked').find("ul").slideUp();
                    }
                }).addClass('has_ul');

            });
        &lt;/script&gt;
</code></pre>

<p>With the modifed jquery to accomdate a href tag is not working.</p>

<p>Here li tag is parent and ul is child and the chain continues.</p>

<p>(Part of the code is from cssplay.)</p>
