JSFiddle - React, Tailwind, and code Playground

by web_developer_888

HTML

<div id=''>
    test1
</div>
<div id='id1'>
    test2
</div>
<div id=''>
    test3
</div>

JavaScript

$('<br />').insertBefore('#id1');
$('<br />').insertAfter('#id1');