I want to add and remove the element from the DOM . For remove I am using JQuery remove() function . Before removing the element I am coping that element using clone() method :
element = $("#list-view").clone();
$("#list-view").remove();
This is working perfectly . But In another case I want to append the same element to the DOM again . So I am using the element which I have cloned earlier :
document.getElementById("container").appendChild(element);
But nothing is happening while appending the element . Am I missing anything ?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.