JSFiddle - React, Tailwind, and code Playground

by rudygotya

HTML

<input type="button" value="test remove after traversing">
<form action="#">
    <div>text</div>
</form>

JavaScript

$(function () {

    $('input').click(function () {
        $('form')
        .find('div')
            .remove()
            .end()
        .remove();
    });
});