Hi Bruce,

Adam's solution was very close, but you'll need an "s" on the end of "parent."

        $(this).parents('tr').highlightFade...

Also, if you have nested tables for some reason, you can put the :first pseudo-class on the tr, like so:

        $(this).parents('tr:first').highlightFade...

Let me know if that doesn't work for you.

--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Mar 30, 2007, at 8:09 AM, Bruce MacKay wrote:

Thanks Adam,

That's certainly closer, but it's not quite there - at least on my page.

$(this).parent('tr').highlightFade.... doesn't fire.

On the other hand, $(this).parent('td').highlightFade... does fire on the td within which the checkbox sits.

Sorry, but I'm unsure how to go one step further back to finger the parent tr of the current td.

Cheers/Bruce

At 11:54 p.m. 30/03/2007, you wrote:
Hi!
> I'm after some assistance (syntax I guess) on how one selects the
> current row of a table.
>
> The context of this query is that I have a table of data in which the > last column of each row contains a checkbox which the user checks if
> the data case is to be deleted.
>
> When checked, I want the row to be highlighted/fade as a visual check
> for the user that they have checked (for deletion) the row of data
> they intended.
> My code thus far is:
>
> $('[EMAIL PROTECTED]').click(function() {
> $(select-the-current-tr).highlightFade({color:'yellow',speed: 2000,iterator:'sinusoidal'});});
>
>
> What should go in the "select-the-current_tr" section?
this).parent('tr'

this will apply the highlightFade method on the input's tr parent.

Cheers,
Adam

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to