Add css font color with jquery

css, javascript, jquery

Solution

You could do it the quick-way:

$(".winning-col", this)
  .text($("td.win", this).length)
  .css("color", "pink");

But ideally, you would use .addClass instead:

$(".winning-col", this)
  .text($("td.win", this).length)
  .addClass("hilighted");

Where

.hilighted { color: pink; }

Problem

Sure it's a simple question, but I can't fix it, can somebody help me? This is the original line ``` $('.winning-col', this).text($('td.win', this).length); ``` and this is where I came up with, surely not correct. ``` $('.winning-col', this).text.css('color', 'pink'($('td.win', this).length)); ```

Original source