Increment variable on click jquery
<p>i´m working on an interactive Infographic. Basically there are is a number of circles flying around. I try to change the amount of circles by clicking on a button, therefor I want to increase the <strong>variable d</strong> by 1 on click, to get an other element from the array. But it doesnt´t work. Any ideas?</p>

<pre><code>var leuko = ["167", "143", "134", "96"]; //array


var d = 0; //variable

$("#day").click(function() {

d += 1;
</code></pre>

<p>_</p>

<pre><code>for (var i = 0; i &lt; leuko[d]; i++) {

var x = 20 + (Math.random() * (canvasWidth - 40));
var y = 20 + (Math.random() * (canvasHeight - 40));

var radius = 5;
var vX = Math.random() * 0.2;
var vY = Math.random() * 0.2;
</code></pre>

<p>I hope you can understand my problem, as my english isn´t the best.</p>

<p>Here is a jsfiddle-link. Layout looks a little bit messed up..</p>

<p><a href="http://jsfiddle.net/JDU6H/" rel="nofollow">http://jsfiddle.net/JDU6H/</a></p>

<p>Thanks!</p>
