jquery add div before first another div code example
Example 1: append before jquery
$( "h2" ).insertBefore( $( ".container" ) );
Example 2: prepend element jquery
$( ".inner" ).prepend( "<p>Test</p>" );
$( "h2" ).insertBefore( $( ".container" ) );
$( ".inner" ).prepend( "<p>Test</p>" );