On 11 Feb, 15:22, quirksmode <[EMAIL PROTECTED]> wrote: > I have created a table, at the end of each table row is a checkbox. > When the user selects the checkbox, that row will fade out to give the > illusion its now disabled. When the checkbox is unchecked I want the > row to fade back.
hi for the checkbox you can use a code like this: $('.deleteRow').click(function(){ if ($(this).is(':checked')) $ (this).blur().parent().parent().animate({opacity: "0.2"}); else $ (this).blur().parent().parent().animate({opacity: "1"}); }); I added a blur() so the faded checkbox gets deselected. ~ personally I'd rather do something like this: $('.deleteRow').click(function(){ if ($(this).is(':checked')) $ (this).blur().parent().parent().children('td').not(':last').animate({opacity: "0.2"}); else $ (this).blur().parent().parent().children('td').not('last').animate({opacity: "1"}); }); this way the checkbox doesn't fade with the rest of the cells :)