So is what I am trying to do not possible?

On Sat, Jan 28, 2012 at 6:28 PM, dv <[email protected]> wrote:

> Hey all,
>
> I need to custom a table row based on whether the value of one of the
> cells is an even or odd number. So after table is created, I add this
> line of code:
>
>
> $('.google-visualization-table-td-number').each(function(){ $
> (this).html()%2==0 ? $(this).parent().css('background-color','red !
> important') : $(this).parent().css('background-color','blue !
> important') });
>
>
> I inspect in google chrome browser and indeed the background color is
> applied to the table row. But it's not actually rendering the color
> for the table row in the browser. Thats because whatever value is set
> in .google-visualization-table-tr-even and .google-visualization-table-
> tr-odd classes is overriding my background style.
>
> So I do this:
>
> $('.google-visualization-table-tr-even').removeClass('google-
> visualization-table-tr-even');
> $('.google-visualization-table-tr-odd').removeClass('google-
> visualization-table-tr-odd');
> $('.google-visualization-table-td-number').each(function(){ $
> (this).html()%2==0 ? $(this).parent().css('background-color','red !
> important') : $(this).parent().css('background-color','blue !
> important') });
>
> And it works, the colors display right, but as soon as I hover over
> one of rows, the  .google-visualization-table-tr-even and .google-
> visualization-table-tr-odd classes come back and the backgorund-color
> goes away.
>
> Any good way to fix this problem?
>
> thanks for response
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" 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/google-visualization-api?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" 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/google-visualization-api?hl=en.

Reply via email to