Insert content to the beginning of an element. Vanilla JS equivalent prepends to a single element, to prepend to multiple elements you need a loop. Same applies to append.
Source code viewer
var container = document.getElementById('container'); var newElement = document.createElement("div"); container.prepend(newElement);Programming Language: Javascript