Cannot differentiate between classes

Cannot differentiate between classes

Hi there - 

I am building a menu system and I cannot seem to differentiate between the different class elements in my menu.  My problem is that when I click on one of the 'buttona' elements, all the ul's with 'effect' fire - does anybody know how to differentiate so that if the one li is clicked just the corresponding ul with open and close?

Thanks!
Rob

my html - 


  1. <ul> 
        <li><a class="buttona" href="#">Application one</a>
            <ul class="effect"> 
                    <li><a href="#">Add</a></li> 
                    <li><a href="#">Edit</a></li> 
                    <li><a href="#">View</a></li>
                    <li class="last"><a href="#">Delete</a></li> 
            </ul> 
        </li> 
        <li><a class="buttona" href="#">Application two</a></li>
        <li><a class="buttona" href="#">Application three</a>
            <ul class="effect"> 
                    <li><a href="#">Add</a></li> 
                    <li><a href="#">Edit</a></li> 
                    <li><a href="#">View</a></li>
                    <li class="last"><a href="#">Delete</a></li> 
            </ul> 
        </li>
    </ul> 

My JS - 
  1. var isHidden = true;
  2. $(function() {
  3. function runEffect(){
  4. if(isHidden) {
  5. $("li ul.effect").show('blind',500);  //run the effect
  6. isHidden = false;
  7. } else {
  8. $("li ul.effect").hide('blind',500);  //run the effect
  9. isHidden = true;
  10. }
  11. };
  12. $(".buttona").click(function() {runEffect(); return false; }); //initiate the click
  13. $(".effect").hide();
  14. });