append before text javascript code example
Example 1: javascript append how first element
// 2018+ Version
parentElement.prepend(newFirstChild)
Example 2: javascript add element above
$( "<p>Test</p>" ).insertBefore( ".inner" );
// 2018+ Version
parentElement.prepend(newFirstChild)
$( "<p>Test</p>" ).insertBefore( ".inner" );