I have a problem with .append() function.
$('#add_row').on('click', function(){
var new_row = $(row_default).clone();
new_row.find('.col-1').text($(this).find('.ass-col-partenza').text());
new_row.find('.col-2').text($(this).find('.ass-col-colore').text());
new_row.find('.col-3').empty().html($select.clone());
$table.append(new_row);
console.log('New row added with select: ', $select);
});
$('#add_option').on('click', function(){
var option = $('<option/>').val('Value '+idx).text('Text '+idx);
idx++;
// This should add options, and they should be added to DOM in future .append()
$select.append(option);
$('#my_table').find('.my_select').append(option);
console.log('Added new option, new select is: ',$select);
});
Here is the fiddle with a short instruction list: http://jsfiddle.net/v15zyzxj/5/
I would expect that if I append an option, this is shown if I append a new row.
PS I deleted my previous question because it was getting pretty messy.