[jQuery] Re: Change background of table row based on column's value

2009-03-12 Thread James
Sorry, Number() is probably better. :) if (Number($(this).text()) > 90) On Mar 12, 12:32 pm, James wrote: > Looks good. Might also want to make sure the text value is a number. > Maybe do a conversion or something. > > if (parseInt($(this).text()) > 90) > > On Mar 12, 12:15 pm, Charlie Griefer

[jQuery] Re: Change background of table row based on column's value

2009-03-12 Thread James
Looks good. Might also want to make sure the text value is a number. Maybe do a conversion or something. if (parseInt($(this).text()) > 90) On Mar 12, 12:15 pm, Charlie Griefer wrote: > disclaimer: n00bie code (seems to work, but might not be particularly > elegant) :) > > $(function() { > $('.

[jQuery] Re: Change background of table row based on column's value

2009-03-12 Thread Charlie Griefer
disclaimer: n00bie code (seems to work, but might not be particularly elegant) :) $(function() { $('.numericColumn').each(function() { if ($(this).text() > 90) $(this).parent().css('backgroundColor', 'red'); }); }); On Thu, Mar 12, 2009 at 12:33 PM, Lars wrote: > > I am totally new to jQuery. I