I have two tables and I want that when user clicks clone, the two dropdownlists are added in a single row (each one in a column). I tried in so many ways but I can make it work, please help.
My js:
function initialize(){
$("#butonID").click(function (){
var aux = '<tr><td id="col-1"></td><td id="col-2"></td><td id="col-3"></td><td="col-4"></td></tr>';
$('#tblSalida').append(
$(aux).find('#col-1').append($('#prueba').clone().attr('id', 'nuevo').attr('class', '')).end()
);
$('#tblSalida').append(
$(aux).find('#col-2').append($('#prueba2').clone().attr('id', 'nuevo').attr('class', '')).end()
);
})
}
UPDATE
modified the link
Finally I solved my problem:
jsfiddle here