jQuery - Getting the second level parent of an element
Solution 1:
For selecting a second parent
parents(':eq(1)')
looks smoother than
parent().parent()
Also, you might find that
closest('ul')
fits the job better.
Solution 2:
try:
$(this).parent().parent().find('.thingtofind').text();
Solution 3:
parents() returns a list, so this works:
$(this).parents()[1];
Solution 4:
$('.mixPlayCell a').click(function() {
elem = $(this).parent().parent();
title = $("tag selector goes here",elem).html();
});
Something like this?