Hi guys lets say I have the following html:
<div class="owner">
<div>
<a href="javascript:void(0)" onclick="">click</a>
</div>
</div>
<div class="owner">
<div>
<a href="javascript:void(0)" onclick="">click</a>
</div>
</div>
I want to put code in the onclick handler so it results in selecting the element of class ‘owner’ which encloses it – so I don’t have to refer to the parent element by typing in this.parentNode.parentNode etc
I’d appreciate if theres a way to do it using selectors from both prototype and jquery.
$().parents(<selector>)is your friendexample