I want a div to be duplicated when a button is clicked. I though something like this; but it\'s not working. Can anyone help me?
HTML
duplicate EVERYTHING INSIDE THIS DIV Click me $("#button").on('click', function (e) { e.preventDefault(); var $self = $(this); $self.before($self.prev('table').clone()); });