javascript removeChild() and appendChild() VS display=none and display=block|inline
- by Kucebe
I'm developing a web application that shows some controls and descriptions dinamically (I don't want to use jQuery or other libraries).
At this moment i make appear and disappear controls using:
element.setAttribute("style", "inline");
and
element.setAttribute("style", "none");
but i'm thinking about using:
element.appendChild(childRef);
and
element.removeChild(childRef);
So, which one is the best solution in terms of system speed and elegance of the code? (and of course, are there better solution?)