test for background color

test for background color

Below is a spinet of code that is suppose to change the background color if it is NOT red, but isn't working.

Please comment!

  1. if( $("input#translate").css("background-color")!=rgb(255,0,0)){
  2. $("input#translate").css("background-color","green");
  3. }