I have a complex jquery expression which I have stored in the variable "that":
that = $('table[class=a]').find('a[href^="xx"]').closest('td')[0]
<td>
<a href="xx....">
</td>
I'm not sure how to open the contained link using "that" as the starting point. I tried
$(that>'a').each(function(){
window.location.href = $(this).attr('href');
});
this yields an empty set in firebug. How can I fix this?
$('table[class=a]').find('a[href^="xx"]')that = $('table[class=a]').find('a[href^="xx"]'); window.location = that.prop('href')