Hi Im trying to replace some html with Jquery, this is what I got so far.
$(".old").html($(".new").html());
This almost work. Only that the .new is being copied, instead of replacing. I wan't to Cut/Paste instead of Copy/Paste
Hi Im trying to replace some html with Jquery, this is what I got so far.
$(".old").html($(".new").html());
This almost work. Only that the .new is being copied, instead of replacing. I wan't to Cut/Paste instead of Copy/Paste
This could work: $('.old').empty().append($('.new'));
. It would move the element instead of duplicating.