Quite complicated. You should be using some identifier to do this and
not rely on the HTML tree, and tables are meant for tabular data.

This might work anyway, if there are no <a> after .timer:

$('.timer').parents('table').find('a:last')

or

$('table:has(.timer)').prev('table').find('a')

On Sep 10, 6:29 pm, "ryan.j" <ryan.joyce...@googlemail.com> wrote:
> not sure if there is a neat way of doing it, but providing the nested
> tables aren't too busy would it be horribly inefficient to do
> something like this?
>
> get the prev <a> to <span>,
> check if <span> is closest to <a>,
> if false get the prev <a> to the current <a> and test again,
> if true you have your element.

Reply via email to