title: How do I toggle color attributes in jquery?
body: <p>I'm trying to toggle the color of a button every time it's clicked. I'm able change the color initially, but not able to change it back.</p>
  <pre><code>$(&quot;#greenCirc&quot;).click(function(){
      if($(&quot;#greenCirc&quot;).css(&quot;background-color&quot;, &quot;green&quot;)){
          $(&quot;#greenCirc&quot;).css(&quot;background-color&quot;, &quot;yellow&quot;);
      }   
      else{
          $(&quot;#greenCirc&quot;).css(&quot;background-color&quot;, &quot;green&quot;);
      };
  });
  </code></pre>