JSFiddle - React, Tailwind, and code Playground
HTML
<div id='wrapper'>
<a class="myselector" rel="I need this value"></a>
<div class="someClass" id="someID">
...bunch of elements/content
<input type="button" name="myInput" id="inputID" value="myinput" title="myInput Title" />
...bunch of elements/content
</div>
</div>
JavaScript
$('#inputID').live('click',function(){
// alert($(this).parent().parent().html());
alert($(this).parent().parent().find('a.myselector').attr('rel'));
});