I’ve got some code that looks like this:
jQuery(this).parent().parent().parent().parent().next(".results-table").css("display", "block");
Basically, after clicking a link inside of a table, the following results table will show, the problem is that this link is inside a td, which is inside a tr, which of course is inside a table, hence the repeated parent selector.
Is there a better way of doing this that I’m missing? I’ve not got lots of experience with jQuery unfortunately.
or