Sorry, I moved this post to the jQuery General Discussion group.
2010/3/2 debussy007 <[email protected]>
>
> Hi,
>
> I would like to have the previous TD element with class "time".
>
> I tried : $(this).closest('td').prev('td.time').html() (where "this" is a
> div element inside a TD)
> But it only works for a div inside a TD that is *directly* following the
> td.time element.
>
> See the code below: my jquery selector above is only working for the div's
> inside <td class="lun01032010"> (where the latter is directly following
> td.time element),
> not for the div's inside <td class="mar02032010">
>
> <td class="time">
> 8am
> </td>
> <td class="lun01032010">
> <div class="quarter daylun"> </div>
> <div class="quarter daylun"> </div>
> <div class="quarter daylun"> </div>
> <div class="quarter daylun"> </div>
> </td>
> <td class="mar02032010">
> <div class="quarter daymar"> </div>
> <div class="quarter daymar"> </div>
> <div class="quarter daymar"> </div>
> <div class="quarter daymar"> </div>
> </td>
>
> Thank you for any help.
> мэтт
> --
> View this message in context:
> http://old.nabble.com/get-the-previous-element-matching-a-class-tp27757069s27240p27757069.html
> Sent from the jQuery UI Discussion mailing list archive at Nabble.com.
>
> --
> You received this message because you are subscribed to the Google Groups
> "jQuery UI" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<jquery-ui%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/jquery-ui?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en.