What I am trying to archive clones my “box” and has a clone with no values. Therefore, the inputs must be empty. I have this fiddle, only with function and html. The hope is clear, and you guys can help me.
http://jsfiddle.net/XeELs/117/
addAddress: function() {
var cloneCount = 0;
$copy = $("#scroll .first").first().clone().attr("id", "to-add-first_Clone" + cloneCount).addClass('cloned');
$(".clone", "#to-add-first_Clone" + cloneCount).attr("id", "clone_Clone" + cloneCount);
cloneCount++;
var $last_bp = $('#scroll .wrap .breakpoint').last();
var $first = $(".first", $last_bp).length;
if ($first > 2) {
$('#scroll .wrap').append('<div class="breakpoint"/>');
$last_bp = $('#scroll .wrap .breakpoint').last();
}
$last_bp.append($copy);
this.drawNavigation();
},
source
share