jquery saving data in array
<p>I want to save and add on every click data to an array. I tried this </p>

<pre><code>var data = [];
var save = [];
s=0;
i=0;

some called function(){
  data[i++] = some result;
  data[i++] = some other result;
}

$('#someelement').click(function(){
save[s++] = data;
console.log(save); // for debugging
i = 0;
data = '';
});
</code></pre>

<p>The first save works, but after that I just empty arrays added. Any pointers ? </p>
