.parents() only travelling up 2 ancestors

.parents() only travelling up 2 ancestors

Hi,

I am using the .parents() function to find a parent element that is up 3 levels. .parents() stops at level 2 and never returns the 3rd.

  1. <div class="ajax_container">
  2.       <div id="ajax_wrapper">
  3.             <nav>
  4.                   <a class="next">Click</a>
  5.             </nav>
  6.       </div>
  7. </div>
Binding a click event to '.next' that gets all the element's parents, I get "nav, div#ajax_wrapper", and that's it.

wtf?


Paddelboot