forum

Home / DeveloperSection / Forums / setting background-color in jQuery?

setting background-color in jQuery?

Mark Devid 2593 08-Apr-2013
Hi Everyone!

I'm trying to make a jQuery that if the value is 130 the color of the background.

Here is my code so far:

function Compute(p, m, f, studno) {
  var average;
  average = parseFloat(p * 0.3) + parseFloat(m * 0.3) + parseFloat(f * 0.4);
  $("#average_" + studno).val(average.toFixed());                           
  if($(this).text()=="130"){
    color:red           
  }       
}

Thanks in advance!

Updated on 08-Apr-2013

Can you answer this question?


Answer

1 Answers

Liked By