There is a "block2" in which there is a list of blocks with text. This text must be dragged to the appropriate blocks in "block1". Those. the text from the first line needs to be inserted into the first line of another block, the second - into the second, etc. It is necessary to pick up the text without rebuilding and copying the structure.

Markup example:

<div class="block1> <div class="block1_text"></div> <div class="block1_text"></div> <div class="block1_text"></div> </div> <div class="block2> <div class="block2_text">Текст 1</div> <div class="block2_text">Текст 2</div> <div class="block2_text">Текст 3</div> </div> 

    1 answer 1

     var text = $('.block2_text'); for (var i = 0; i < text.length; i++) { $('.block1_text').eq(i).text($(text[i]).text()); } 

    jsFiddle

    • How fast, thanks! ;)) - MiHALbI4