jQuery- Erroneous duplicate append to list
<p>Very much new to web development and I've come across an issue when trying to implement a multi dimensional array, when I append a new li to an ul with the code below it produces 2 li's.</p>

<p>The parameters of the function are dest-the ul to append to and list-the multi dim array set as:</p>

<pre><code>var webList2 = [["link.html","name"],["link.html","name"]...
</code></pre>

<p>I'm pretty sure there may be other issues with my code but it seems I may be missing something I'm not familiar with yet.</p>

<p>Anyone able to shed some light?</p>

<pre><code>function expand(dest,list){
    var i = 2;

        function expandLoop() {
            setInterval(function() {

                if(i &lt; list.length) {
                    i++;
                    var $newLi = $('&lt;li&gt;&lt;li&gt;');
                    var $newA = $('&lt;a&gt;&lt;/a&gt;').attr('href',list[i][0]).text(list[i][1]);
                    $newLi.append($newA).appendTo(dest).hide().fadeIn(20);
                }

            }, 20);
        }

    $(expandLoop);
}
</code></pre>

<p>Thank you.</p>
