Change div's background from one color to another like gradient : <p>I want to change background of div from red to green depending on variable value. If var value is 1, the background is red. But as the value increases to 1000, div background becomes greener. Like it goes through red-to-green gradient. How can I do this not using jQuery?</p>

<p>P.S. variable value increases every 2 seconds btw</p>
