Greetings The essence of the work. The code makes the clones I need Div 's. I sign them with .html and assign the required values from the array. Appeared the need to place the picture in each clone. Everything seems to be done as it was, the picture is loaded into the block, but not into everything, but only in the last one. The dependence found on the numbers specified in For . Tell me what I'm doing wrong. It is necessary that each div-clone flew its own Jpzhka .
In this form, the picture is determined in the last Div .
var Store = [ ["Name_2", "N_2"], ["Name_3", "N_3"], ["Name_4", "N_4"] ]; var Sum = Store.length+1; var Images = [["1.jpg"],["2.jpg"],["3.jpg"]]; var Cover = Images.length; $(document).ready(function() { window.onload = function () { var oImage = new Image(); oImage.onload = function () { for (var q=0; q<Cover; q++); document.getElementById('Image' + '_' + q).src = oImage.src; }; oImage.src = Images[1]; }; var container = $("#container"), containers = Store.slice(0).map(function(el, index) { var clone = container.clone(); clone.children().html(function(i) { $('div.Pr').html("<b>Pr: </b>" + el[0]); $('div.Dr').html("<b>Dr: </b>" + el[1]); return i[el]; }).andSelf() .attr("id", function(i, attr) { return attr + '_' + (index + 1); }); return clone; }); $(".clone-box").append(containers); }); #container { margin-top: 30px; } .tab { border: 3px double black; background: #; padding: 4px; } <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <link rel="stylesheet" type="text/css" href="Clone.css"> <div id="container" class="tab"> <img id="Image" class="Image" src="" width="30" height="30" align="Right"/> <div id="Pr" class="Pr"><b>Pr: </b>Name</div> <div id="Dr" class="Dr"><b>Dr: </b>N</div> </div> <div class="clone-box"></div>