Here's is what I'm trying to get
<a href="default.aspx?propid=BARN" class="topbook"></a>
The above link should clone the sidelink that has display:block
<a href="default.aspx?propid=FARM" class="sidelink"></a>
<a href="default.aspx?propid=HANW" class="sidelink"></a>
<a href="default.aspx?propid=BARN" class="sidelink" style="display:block"></a>
But I'm getting
<a href="default.aspx?propid=FARM" class="topbook"></a>
Because it is copying the first instance of sidelink href
Here's my code
$('.topbook').attr('href', $('.sidelink').attr('href'));
Hope this helps
Thanks
Jamie