title: Jquery tree traversal not working
body: <p>through tree traversing i am trying to capture the immediate submenu for the item clicked. I have used .parent().siblings() to get the element. But somehow it is not working. Please help me to resolve the issue. Here is the html mark-up.</p>
  
  <pre><code>&lt;ul class="menu"&gt;
  &lt;li class="1"&gt;&lt;a href="#" class="menu-item"&gt;Link1&lt;/a&gt;&lt;/li&gt;
  &lt;ul class="subMenu"&gt;
  &lt;li&gt;Sublink11&lt;/li&gt;
  &lt;li&gt;Sublink12&lt;/li&gt;
  &lt;li&gt;Sublink13&lt;/li&gt;
  &lt;/ul&gt;
  &lt;li class="2"&gt;&lt;a href="#" class="menu-item"&gt;Link2&lt;/a&gt;&lt;/li&gt;
  &lt;ul class="subMenu"&gt;
  &lt;li&gt;Sublink21&lt;/li&gt;
  &lt;li&gt;Sublink22&lt;/li&gt;
  &lt;li&gt;Sublink23&lt;/li&gt;
  &lt;/ul&gt;
  &lt;li class="3"&gt;&lt;a href="#" class="menu-item"&gt;Link3&lt;/a&gt;&lt;/li&gt;
  &lt;ul class="subMenu"&gt;
  &lt;li&gt;Sublink31&lt;/li&gt;
  &lt;li&gt;Sublink32&lt;/li&gt;
  &lt;li&gt;Sublink33&lt;/li&gt;
  &lt;/ul&gt;                    
  &lt;/ul&gt;
  </code></pre>
  
  <p>Here is the javascript code i have used to capture the  list.</p>
  
  <pre><code>var menuItems = $('.menu-item');
      var icon = "&lt;i class='icon icon-collapse'&gt;&lt;/i&gt;";
      var innerMenu;
      $.each(menuItems, function(){
          $(this).append(icon);
          $(this).on('click', function(){
              console.log($(this).parent().closest('ul.subMenu'));
              //$(this).closest('ul.subMenu').show();
          });
  
      })
  </code></pre>