title: jQuery find which child is active and update other sections
body: <p>Multiple nav sections all with the same links. The active section is shown in the first nav via an active class (<code>.active</code>). I'd like to highlight the same link in the subsequent nav sections.</p>
  
  <p>Originally, I used a cloning method (credit due to you fine people, <a href="https://stackoverflow.com/questions/12362175/jquery-replacewith-each-element-with-the-first">jQuery replaceWith() each element with the first</a>) and although it worked perfectly, it interfered with some other functions (because it removes the original elements from the page and replaces them).</p>
  
  <p><strong>So, I need to figure out another, clever way to check the active class of the first section, find the matching links in the subsequent sections, and apply the class.</strong></p>
  
  <p>I'm thinking something like this... but something efficient and less ugly. The answer below <em>does</em> work.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;nav class="postNav"&gt;
      &lt;ul&gt;
          &lt;li class="active"&gt;&lt;a href="#pageHeader"&gt;link to header&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#one"&gt;link to other posts&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#two"&gt;link to other posts&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#three"&gt;link to other posts&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#four"&gt;link to other posts&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#five"&gt;link to other posts&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>var navs   = $('.postNav'),
      first  = navs.first(),
      active = first.find('.active a').attr('href'),
      anchrs = navs.not(first);
  
  anchrs.find('li').removeClass('active');
  anchrs.find('a[href=' + active + ']').parent().addClass('active');
  </code></pre>
  
  <p>UPDATE</p>
  
  <hr>
  
  <p>Maybe by seeing which child in the index is active? Then I don't need to filter by the anchor...</p>
  
  <p>UPDATE + Final Answer</p>
  
  <hr>
  
  <p>My Selector cached version of jfriend's answer:</p>
  
  <pre><code>var nav   = $('.postNav'),
  first = nav.filter(':eq(0)'),
  notF  = nav.filter(':gt(0)'),
  index = first.find('.active').index();
  
  notF.each(function(){
      $(this).find('li').removeClass('active').eq(index).addClass('active');
  });
  </code></pre>