jquery prepend before last child code example Example: appendBefore let insertedNode = parentNode.insertBefore(newNode, referenceNode)