title: How can I change a CSS gradient via JavaScript?
body: <p>I have a div with the following gradient applied to it:</p>
  
  <pre><code>/* Mozilla Firefox */ 
  background-image: -moz-linear-gradient(top, #2E2E28 0%, #4D4C48 100%);
  /* Opera */ 
  background-image: -o-linear-gradient(top, #2E2E28 0%, #4D4C48 100%);
  /* Webkit (Safari/Chrome 10) */ 
  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #2E2E28), color-stop(1, #4D4C48));
  /* Webkit (Chrome 11+) */ 
  background-image: -webkit-linear-gradient(top, #2E2E28 0%, #4D4C48 100%);
  /* IE10+ */
  background: -ms-linear-gradient(top,  #2E2E28 0%,#4D4C48 100%);
  /* W3C */
  background: linear-gradient(top,  #2E2E28 0%,#4D4C48 100%);
  </code></pre>
  
  <p>How could I change "#2E2E28" to another number, but still avoid the cross-browser nightmare?</p>