one document.createElement, append it twice, only shows once
Posted
by Sirber
on Stack Overflow
See other posts from Stack Overflow
or by Sirber
Published on 2010-04-07T17:34:01Z
Indexed on
2010/04/07
19:43 UTC
Read the original article
Hit count: 209
JavaScript
|jQuery
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!
© Stack Overflow or respective owner