Jquery Dynamic 3d
<pre><code>for (var i = 1; i &lt; 6; i++) {           
    $.post("random.php", {ajax: 'true'}, function(data) {
        var mus = data.split('-');       
        var pool = "&lt;a href='"+mus[0]+"&gt;&lt;img src='"+mus[1]+"'/&gt;&lt;/a&gt;";
   --&gt;    $(".rand" + i).html(pool); &lt;--

    });     
}

&lt;div id="list"&gt;
        &lt;ul&gt;
            &lt;li class='rand1'&gt; a&lt;/li&gt;
            &lt;li class='rand2'&gt; a&lt;/li&gt;
            &lt;li class='rand3'&gt; a&lt;/li&gt;
            &lt;li class='rand4'&gt; a&lt;/li&gt;
            &lt;li class='rand5'&gt; a&lt;/li&gt;

        &lt;/ul&gt;
    &lt;/div&gt;
</code></pre>

<p>I'm trying to load modify a list dynamically.. The html is not being set, any thoughts are much appreciated. :)</p>

<p>When I statically assign it    <code>$(".rand" + 1).html(pool);</code>
The html still won't change..</p>

<p>Thanks,</p>

<p>Still confused</p>

<pre><code>      for (var j=0;j&lt;5;j++) {          

    $.post("random.php",{ajax: 'true'}, function(data){

        mus = data.split('-');   
      mus[0] = mus[0].replace(/\r|\n/g, '');   
      mus[1] = mus[1].replace(/\r|\n/g, '');
      //  pool = "&lt;a href='http://www.rain.org/~karpeles/"+mus[0]+"'&gt;&lt;img src='http://www.rain.org/~karpeles/"+mus[1]+"'/&gt;&lt;/a&gt;";
         $("#rand" + j).html("&lt;img src='http://www.rain.org/karpeles/" + mus[1] +"'/&gt;");

     });    

  }
</code></pre>

<p>The code works if I don't include the www ?</p>

<p>Peter</p>
