Click to reveal and hide menu
<p>Why can I click "project info" in this code to reveal the text but cant click it again to get hide the text. I am in experienced with javascript and have made a mess of the code...any help would be appreciated greatly. Here is the html code:</p>

<pre><code>&lt;div  class:"descinner;" style="position:fixed; left:260px; top:595px;"&gt;&lt;a href="javascript:void(0);" class="showDesc" style="display: inline; "&gt;Project info&lt;/a&gt;

                    &lt;div style="width: 500px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color:#fff; opacity: 0.9; position: fixed; margin-top: 10px; margin-left: 100px;  font-size: 14px; font-weight:bold; line-height: 125%; display: none; background-position: fixed; "&gt;


                        Exces eturio. Ipis eos autatus ad quia cum santo doluptio que dignatenis dipsam non cuptam, tectaer iosaperiam repudi imo quaerum resciet acercianis apedipsam dellendae nobis am raectotatur, cum expla enit placcup tasitium quias qui quia illaceribus quiates dolecte occusandit anduntibus doluptat.

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

<p>and here is the script:</p>

<pre><code>&lt;script type="text/javascript"&gt;
                        var descShow = false;
                        $('.showDesc').click(function(){
                            $(this).hide();
                            $(this).next().show();
                            $('.descInner').css();

                            descShow = true;
                        });

                        var ee;
                        $('body').click(function(e){
                            e = window.event || e; 
                            ee = e;

                            var node = e.srcElement || e.target;
                            var $node = $(node);

                            if(node=='javascript:void(0);'){
                                return;
                            }


                    while ($node.html()!=null){
                        if($node.hasClass('descInner')){
                            $('.showDesc').next().hide();
                            $('.showDesc').show();
                            $('.descInner').css();
                            descShow = false;
                            return;
                                }
                                $node = $node.parent();
                            };
                        });
                        &lt;/script&gt;
</code></pre>
