title: nested li - on clicking child, parent click event triggered
body: <p>I have a nested li </p>
  
  <pre><code>&lt;li class="innerMenuLi"&gt;&lt;a href="#"&gt;&lt;span&gt;MainLi&lt;/span&gt;&lt;/a&gt;
  &lt;ul class="mainMenu"&gt;
      &lt;li&gt;&lt;a href="#" class="active"&gt;&lt;span&gt;mainMenu1&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=""&gt;&lt;span&gt;mainMenu2&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=""&gt;&lt;span&gt;mainMenu3&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=""&gt;&lt;span&gt;mainMenu4&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=""&gt;&lt;span&gt;mainMenu4&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li class="secondInnerMenu"&gt;&lt;a href="#"&gt;&lt;span&gt;mainMenu5&lt;/span&gt;&lt;/a&gt;
          &lt;ul class="analyticsMenu"&gt;
              &lt;li&gt;&lt;a href=""&gt;secondInnerMenu1&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href=""&gt;secondInnerMenu2&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href=""&gt;secondInnerMenu3&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href=""&gt;secondInnerMenu4&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p></li></p>
  
  <pre><code>$('.innerMenuLi').children('.mainMenu').click(function(e){
      e.stopPropagation();
      showMenu($(this));
  });
  $('.innerMenuLi').click(function(e){
      showMainMenu($(this));
      e.stopPropagation();
  });
  function showMainMenu(el){
      if(!el.hasClass('open')){
          (el).addClass('open');
          (el).children('.mainMenu').show();
      }else{
          (el).removeClass('open');
          (el).children('.mainMenu').hide();
      }
  }
  function showMenu(el){
      if(!el.hasClass('open')){
          (el).addClass('open');
          (el).children('.analyticsMenu').show();
      }else{
          (el).removeClass('open');
          (el).children('.analyticsMenu').hide();
      }
  }
  </code></pre>
  
  <p>I want different functions to be called for the parent and child li.But now when the child is clicked it triggers the parent.</p>
  
  <p>Thanks in advance</p>