title: Parent Selector Jquery
body: <p>I want to add a class of 'active' to the parent class of an <code>&lt;li&gt;</code></p>
  
  <pre><code>   &lt;div id="navigation"&gt;
              &lt;ul data-identifier="50dd2c0b-3904-4100-9076-627145a3a949" class=" nav nav-pills  nav-edit " id="nav-main-menu"&gt;&lt;li class=" nav-link  dropdown "&gt;&lt;a href="/whoweare" data-toggle="dropdown" class=" nav-link  dropdown "&gt;WHO WE ARE &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;&lt;ul class="dropdown-menu"&gt;&lt;li class=" nav-link  active "&gt;&lt;a href="/mission" data-toggle="" class=" nav-link  active "&gt;Mission &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/history" data-toggle="" class=" nav-link "&gt;History &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/executiveteam" data-toggle="" class=" nav-link "&gt;Executive Team &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li class=" nav-link  dropdown "&gt;&lt;a href="/greatopportunity" data-toggle="dropdown" class=" nav-link  dropdown "&gt;A GREAT BUSINESS OPPORTUNITY &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;&lt;ul class="dropdown-menu"&gt;&lt;li&gt;&lt;a href="/demand" data-toggle="" class=" nav-link "&gt;Demand &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/growth" data-toggle="" class=" nav-link "&gt;Growth &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/opportunity" data-toggle="" class=" nav-link "&gt;United State Opportunity &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/canada_opportunity" data-toggle="" class=" nav-link "&gt;Canada Opportunity &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li class=" nav-link  dropdown "&gt;&lt;a href="/franchiseeadvantage" data-toggle="dropdown" class=" nav-link  dropdown "&gt;THE FRANCHISEE ADVANTAGE &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;&lt;ul class="dropdown-menu"&gt;&lt;li&gt;&lt;a href="/strategy" data-toggle="" class=" nav-link "&gt;Strategy and Tactics &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/performance" data-toggle="" class=" nav-link "&gt;Performance Enhancement &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/businesstools" data-toggle="" class=" nav-link "&gt;Business Tools &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li class=" nav-link  dropdown "&gt;&lt;a href="/method" data-toggle="dropdown" class=" nav-link  dropdown "&gt;THE MATHNASIUM METHOD &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;&lt;ul class="dropdown-menu"&gt;&lt;li&gt;&lt;a href="/howitworks" data-toggle="" class=" nav-link "&gt;How It Works &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li class=" nav-link  dropdown "&gt;&lt;a href="/investment" data-toggle="dropdown" class=" nav-link  dropdown "&gt;INVESTMENT &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;&lt;ul class="dropdown-menu"&gt;&lt;li&gt;&lt;a href="/unitedstates" data-toggle="" class=" nav-link "&gt;United States / Canada &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/international" data-toggle="" class=" nav-link "&gt;International &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li class=" nav-link  dropdown "&gt;&lt;a href="/meet" data-toggle="dropdown" class=" nav-link  dropdown "&gt;MEET OUR FRANCHISEES &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;&lt;ul class="dropdown-menu"&gt;&lt;li&gt;&lt;a href="/testimonials" data-toggle="" class=" nav-link "&gt;Video Testimonials &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/writtentestimonials" data-toggle="" class=" nav-link "&gt;Written Testimonials &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/steps" data-toggle="" class=" nav-link "&gt;STEPS TO OWNERSHIP &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/news" data-toggle="" class=" nav-link "&gt;NEWS / PRESS &lt;/a&gt;&lt;/li&gt;&lt;li class=" nav-link  dropdown "&gt;&lt;a href="/QandA" data-toggle="dropdown" class=" nav-link  dropdown "&gt;Q&amp;amp;A &lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;&lt;ul class="dropdown-menu"&gt;&lt;li&gt;&lt;a href="/QandA_US-Canada" data-toggle="" class=" nav-link "&gt;United States / Canada &lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="/QandA_international" data-toggle="" class=" nav-link "&gt;International &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;
              &lt;div id="consumerSite"&gt;&lt;br&gt;&lt;div style="margin-left:22px"&gt;
    &lt;img src="../upload/1/img/cosumerArrow.gif" width="5" height="9" style="margin-right:4px;"&gt;&lt;a href="mailto:?subject=A franchising opportunity referral&amp;amp;body=I thought you might be interested in this Mathnasium Learning Center franchising opportunity. To learn more, visit www.mathnasium.com/franchising"&gt;Tell a Friend&lt;/a&gt;&lt;img src="upload/1/img/tellafriend.jpg" width="20" height="11" class="tellafriend"&gt;&lt;br&gt;&lt;br&gt;
  
  
  
  &lt;img src="../upload/1/img/cosumerArrow.gif" width="5" height="9" style="margin-right:4px;"&gt;&lt;a href="http://www.mathnasium.com/" target="_blank"&gt;Visit our consumer site at&lt;br&gt;
  &amp;nbsp;&amp;nbsp;&amp;nbsp;www.mathnasium.com&lt;/a&gt;
  &lt;br&gt;
  &lt;/div&gt;
  &lt;/div&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <p><code>jQuery('ul li ul li a').parent('ul li').addClass('active')</code>;</p>
  
  <p>I'm not sure as to why I can't grab the li that belongs to whoweare. </p>
  
  <p>EDIT: Provided complete section of code. Just trying to add a active class onto the WHO WE ARE <li> tag. </p>