javascript/jQuery anonymous functions to populate an array
<p>Hi I was just wondering if building an array in javascript was possible using a function like so. I have a variable that is getting the margins of a series of elements using <code>$(ele).css('margin');</code>. This returns a string of <code>0px 0px 0px 0px</code> where I only want the left property to check whether it's been animated <code>-=</code> left.</p>

<p>I can do a similar function but I know there must be a better way. Here's my example:</p>

<pre><code>var marginsLeft = new array();
$(ele).each(function(i){
    var r = $(i).css('margin').split(" ");
    marginsLeft[i]=r[3];
});
</code></pre>

<p>I'm not entirely sure how to simplify this, but I'm sure it's possible :) thanks in advance.</p>
