Javascript Multidimensional Arrays - undefined error
<p>Luckily this forum exist, so of I go with posting a tricky question to the great masters...
I am working on a program that loads multiple images in a page.
The program does what it suppose to do, the problem is that I am getting an <code>undefined error</code>, and I don't have any idea what is the cause, the program is the following:</p>

<pre><code>var imagesList = [['aaa','sss'], ['bbb','ttt']];
putImages(imagesList);
function putImages(imagesList){
  var i = 0;
  if ($(imagesList).length &gt; 0){ 
    LoadImage(i, imagesList);
  }
}

function LoadImage(i, imagesList){
  var ele = imagesList[i][0],
    name = imagesList[i][1];    
  if(i &lt; $(imagesList).length){
    var curr = $('&lt;li id="pic-'+ i +'"&gt;&lt;div&gt;'
                         + name +'&lt;/div&gt;').addClass("loading");
    $(curr).appendTo(".photos");
    var image = new Image();
    $(image).load(function(){       
        $(this).appendTo("#pic-" + i);  
        $(curr).removeClass("loading"); 
        LoadImage(i+1, imagesList );
    }).error(function(){
    }).attr("src", ele);
  }
}
</code></pre>

<p>I tried to use the advice from this link <a href="http://stackoverflow.com/questions/2808926/javascript-multidimensional-arrays">JavaScript Multidimensional Arrays</a>, but it is just what ever I try i keep getting this error in Firefox, the other browsers seem to be ok.</p>

<p>Thanks a lot in advance.</p>
