I am wondering about the pros/cons of adding elements to a page and setting display:none versus creating a function that will dynamically create the elements and append them where they need to go.
In my case I am doing a reply box that gets attached to whatever comment you want to reply to. Atm I just have it hidden via CSS and then move it to whatever node I want with an onclick function. Is there a better way? I am quite new to taking into account DOM rendering times etc, but I wanna get it right from now on.