Q:

jquery 3 level menu

i'm trying to make 3 level vertical menu
i have 2 level, but its hard to make it 3 level....
here is my 2 level vertical menu...
http://fiddle.jshell.net/3Xvrc/1/
plz anyone can help me ?

A:

jsBin demo
(function($){ 
  
  $('.menu a').click(function( e ){
      e.preventDefault();
      $(this).parent('li').find('ul:first').slideToggle();    
  });
  
})(jQuery);

HTML:
<ul class="menu">
  
    <li>
      <a href="#">1 level</a>   
      <ul class="depth2">
        <li><a href="#">2 level</a></li>
        <li><a href="#">2 level</a></li>
      </ul> 
    </li>
  
    <li><a href="#">1 level (no 2 level)</a></li> 
  
    <li>
      <a  href="#">1 level</a>
        <ul>
            <li><a href="#">2 level</a></li>
            <li>
                <a href="#">2 level (with 3 level)</a>
                <ul>
                    <li><a href="#">3 level</a></li>
                    <li><a href="#">3 level</a></li> 
                </ul>
            </li> 
        </ul>
    </li> 
    
</ul> 

CSS:
 .menu {
  width:200px;
  padding:0;
}
 .menu li { 
  background:#CCC;
  margin:0;
} 
 .menu li {
  display:block;
  color:#000;
  overflow:hidden;
}
 .menu li a {
  display:block;
  padding:5px 0;
  color:#06C;
  border-bottom:1px solid #666; 
} 
 .menu li > ul {
  display:none;
  overflow:hidden;
  padding:10;
} 
.menu p ul.depth2 li a{ 
  color:#fff;
  display:block; 
}

