one document.createElement, append it twice, only shows once
- by Sirber
I have a button I want to use in the beginning and the end of the page:
var button_save = document.createElement('button');
$("#compteurs").append(button_save);
[...]
$("#compteurs").append(button_save);
but it only appear at the end of the page. If I remove it from the bottom of the page, it appear at the begining of page. It's a kind of pointer. Is there a way to create the button only once and use it twice? Thanks!