you are doing a very weird thing to an array
I guess jQuery detects that myArray is a reall Array.
Then it iterate over it by using the "length" attribute. However you didnt
actually put anything into the Array "myArray" therefore, you dont get
anything.



On Fri, Aug 28, 2009 at 3:49 PM, davidshe...@googlemail.com <
davidshe...@googlemail.com> wrote:

>
> Hi,
>
> i have an array initialized like
> var myArr = new Array();
>
> later I use
>
> myArray['somestring'] = new Array();
> myArray['somestring'].push(mydata);
>
> to create and new array inside of it, and populate my data by pushing.
> Then I want to use the jQuery.each(...) to iterator over it, like this
>
> $.each(myArray, function(){
> alert(this);
> });
>
> But I found the jQuery does not event enter the loop. What's wrong
> with my array?
>

Reply via email to