I've trying to solve this for a while, I would appreciate any help. I have three columns. Each of the columns contains a pair of Add/Remove buttons at the top. I would like for the add button to append a clone of the parent column after the parent.I've tried various methods for cloning the parent div but to no avail.
I would also like for the remove button to remove the containing column. I only managed to have first column work with the remove button. This function does not work with the following Columns.
I would be very appreciative for some assistance. Thanks you.
http://jsfiddle.net/equiroga/h2dnn/2/
$(document).ready( function() {
$("#add").click( function() {
$(".day-column").append(".day-column");
$('.day-column').clone().attr('class','.day-column').insertAfter('.day- column:first');
});
$("#remove").click( function() {
$(".day-column:first").remove('.day-column:first');
});
});