jquery prevent double tapping the same element
<p>Hy, i'v got a horizontal css menu. When clicked on a tab i do a toggle to switch between the css selected class. This class just removes the bottom-border and colors the font, so it seems like it's an active tab. That's al fine, problem is, i would not like to toggle again when clicking on the same tab that's active.</p>

<p>Example: </p>

<p>-> click on home
-> | <strong>Home</strong> | tab selected. 
-> click on home again
-> | Home | tab deselected. </p>

<p>This is the on ready code: </p>

<pre><code>$('#tabmenu li').click(function(e) {

$(this).toggleClass("clicked");
    $("#tabmenu li").not(this).removeClass("clicked");      

  });
</code></pre>

<p>CSS:</p>

<pre><code>#tabmenu li.clicked {
             /*remove a piece of UL bottom-border*/
                             border-bottom: 1px solid #fff; 
             margin-bottom: -1px;

                             /*make it show active*/
             border-top:1px solid #7C798E;
             border-left:1px solid #7C798E!important;
             border-right:1px solid #7C798E;
         }   
         #tabmenu li.clicked a { color:#000070;} 
</code></pre>

<p>PS.</p>

<p>I thought of doing something like: </p>

<p>... //which element are you
...//temp save
....// are you the same as last one?
.....// YES? -> do nothing, NO -> toggle.</p>

<p>Is there a more brighter way to do this? thx. </p>
