Could you please tell me how to copy events, if I copy some html? I have a function to copy:
function add_to_order( row, row_input_value ) {
$('#buffer').html( row ).find('td:first').remove(); // add row to buffer and remove the first td element
$('#buffer').append('<td class="delete"><span class="remove-from-order button minus" ></span></td>').html(); // append minus
var row_clear = $('#buffer').html();
$.post('core/ajax.linker.php',
{action: 'add_to_sess', data: row_clear}
);
$('.items').append('<tr class="fresh">'+row_clear+'</tr>').find('input.add-amt:last').val(row_input_value); // highlight new
$('.fresh > td > .add-key').attr("class", '');
$('.fresh > td > .add-value').attr("class", '');
count_sum();
}
And a function, that should work after the previous copied html:
$('input.add-amt').keyup( function () {
var amt = $(this).val();
count_sum();
});
In fact, the first one copies the textfield, and the second have to get the value of that field, but it doesn't.
Any help will be appreciated