title: Change background color from js
body: <p>I would set the background color of an element by onclick javascript function.
  My code is:</p>
  
  <pre><code>function changeBg( el ) {
      if( $( el ).css( "background-color" ) === "rgb(255,255,0)" ) {
          $( el ).css( "background-color", "red" );
      }
      else {
          $( el ).css( "background-color", "rgb(255,255,0)" );
      }
  }
  </code></pre>
  
  <p>This code works for change the default background color to yellow (rgb(255, 255,0)) but it doesn't work from yellow to red. The first condition is always skipped</p>