On Tue, 26 Apr 2016 09:01:13 +0200, Jake Jarvis wrote:
> Am 26.04.2016 um 08:09 schrieb bit-naughty@hotmail.com:
>> I know about AppendChild, but if I say, have a <div> and I want another <div> *next* to it to appear when a particular button is clicked - i.e. _it's at the same level in the DOM tree_ !!! , then what do I do?
>>
>>
>> Thanks.
>>
>
> Go up one level to the parent element and use the insertBefore(newChild,
> refChild) method.
Or insertAdjacentHTML(). Whichever is applicable.