Please help me with extracting window.location.href
from a button ....
click function doesn't work... just sends me to the main page and does nothing... I want to find it inside of an iframe why there is (#xx)
<button type="button" value="Upgrade to level 2" class="green build" onclick="window.location.href = 'dorf2.php?а=32&c=Wra'; return false;">
<div class="button-container addHoverClick ">
<div class="button-background">
<div class="buttonStart">
<div class="buttonEnd">
<div class="buttonMiddle"></div>
</div>
</div>
</div>
<div class="button-content">Upgrade to level 2</div>
</div>
</button>
way I think to get is
var buttonLink = $('#xx').contents().find('button.green.build').attr('href');
//or
var buttonLink = $('#xx').contents().find('button.green.build').text().attr('href');
.attr('href')
will not work here because of window.location.href
it is not same I think .... please help me copy it inside of attribute