title: Add class to selected li through Jquery
body: <p>I have written a Jquery for Dropdown menu.
  It's working fine, but when I click on "li" it's opening fine but css is not being added on select li class..</p>
  
  <p><strong>Jquery:</strong></p>
  
  <pre><code>$(".leftnav ul li").click(function () {
           $(this).siblings().find('ul').slideUp(400);
              $(this).find('ul').slideDown(400);      
              $(this).find('ul').addClass('activeclass'); 
              $(this).find('.leftnav ul li').addClass('activeclass1'); 
      });
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div class="leftnav left"&gt;
          &lt;ul&gt;
              &lt;li&gt;&lt;a href="javascript:;"&gt;Dashboard&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="javascript:;"&gt;Catagories&lt;/a&gt;
                  &lt;ul class="dropdown"&gt;
                      &lt;li&gt;&lt;i class="fa fa-angle-double-right left color iconpad"&gt;&lt;/i&gt; &lt;a href="#"&gt;Add Category&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;i class="fa fa-angle-double-right left color iconpad"&gt;&lt;/i&gt;&lt;a href="#"&gt;Manage Catagories&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/li&gt;
  
              &lt;li&gt;&lt;a href="javascript:;"&gt;Portfolio&lt;/a&gt;
                  &lt;ul class="dropdown"&gt;
                      &lt;li&gt;&lt;i class="fa fa-angle-double-right left color iconpad"&gt;&lt;/i&gt;&lt;a href="#"&gt;Add Portfolio&lt;/a&gt;&lt;/li&gt;
                      &lt;li&gt;&lt;i class="fa fa-angle-double-right left color iconpad"&gt;&lt;/i&gt;&lt;a href="#"&gt;Manage Portfolio&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Can anyone let me know how can I do it?</p>
  
  <p>Thanks in advance.</p>