jQuery calculation inside loop
<p>How can i make a loop and add some values for the next iteration together like these in jQuery ?</p>

<pre><code>var currLength = length;
for (var i = 1; i &lt; dotCount -1; i++) {
  $("#myElement" + i).css("width", currLength);
  currLength += length + margin;
}
</code></pre>

<p><strong>Edit:
These is just an example. I just wanted to know how to use the .each function of jQuery because i had some different idea of usage. I doesn't make any difference in relation to a for loop</strong></p>
