53/97

Insert given html after or before an element

Insert after

Insert html after the ele element:

ele.insertAdjacentHTML('afterend', html);

Insert before

Insert html before the ele element:

ele.insertAdjacentHTML('beforebegin', html);

Might be useful