I made a toggle function that change the parent of a child element with some code from HERE. But I want to know if there is a way to change the parent with animation, because now it just jump from one div to another.
Here is some code:
function SW()
{
$("#SW").toggle(function(){
var element = $("#RelativeChild").detach().appendTo("#ParentRight");
},
function(){
var element = $("#RelativeChild").detach().appendTo("#ParentLeft");
});
}