Unable to change inline css color of TD...

Unable to change inline css color of TD...

Hi,

I have the following piece of code to change the text color of TD inside a TR when a Checkbox is clicked :

I've inspected the element and it's the right one but the change doesn't take effect.  I don't know what I'm doing wrong and I don't see any error in the console.  It's just not doing the job!

Any ideas ?

  1. $( '.SelectedProducts' ).click( function () {

    if ($( this ).is( ':checked' ))

         $( this ).closest( 'tr' ).eq(0).find( 'td.CellStyle.Product' ).eq(0).css( 'color' , 'white' );

    else

         $( this ).closest( 'tr' ).eq(0).find( 'td.CellStyle.Product' ).eq(0).css( 'color' , 'rgb(120, 120, 120)' );

    });