You need to increment the top: x
value with each "row" iteration:
var $dna = $("<div class='dna'></div>");
var n= $('.box').length / 3;
var boxHeight = $('.box').height();
var topPos = 0;
for(var i = 0; i < n; i++){
$dna.clone().css('top',topPos).appendTo('.entry');
topPos += boxHeight;
}
You can adjust the height values to get the bar to position where you need it.