 <p>You can supply a <code>function(i, attr)</code> into your <code>.attr()</code></p> <pre><code>for (var i = 0, len = data.length; i &lt; len; i++) { var $div = $(".venue:first").clone(); data.[i].photos; $div.find(".photos").attr("src", function(index, src){ return data[i].photos[index]; }); } </code></pre>