JSFiddle - React, Tailwind, and code Playground

by lollero

HTML

<div>normal div1</div>
<div>normal div2</div>

<button>Click here to remove the jquery generated divs</button>

JavaScript

$('<div class="jsgen">Div that was prepended with jquery</div><div class="jsgen">Div that was prepended with jquery</div>').prependTo('body');





$('button').on("click", function() {

    $('.jsgen').remove();

});