Is there a way to move steps up in the DOM through JQuery or Javascript? (preferably JQuery)
To avoid doing a sequence of parent()
tags, I should better use something that could sum something like this up:
$('.myElement').parent().parent().parent().fadeIn();
This should target the .final
element in the following example:
<div class="final">
<div>
<div>
<div class="myElement"></div>
</div>
</div>
</div>