jquery append befo code example
Example 1: append before parent jquery
$('ElementBeforeYouWantToInsert').prepend('<div>the element you want to insert</div>');
Example 2: appendBefore
let insertedNode = parentNode.insertBefore(newNode, referenceNode)