I need to append an element onclick just after another (a textarea).
How do I do that?
The accepted answer will work in this specific case, but to insert an element after another more generally, the following does the job:
someElement.parentNode.insertBefore(newElement, someElement.nextSibling);
Where newElement is the element to be inserted and someElement is the element it is to be inserted after.
W3C insertBefore method of the Node interface