JSFiddle - React, Tailwind, and code Playground

HTML

<div>
  <div style="color:red;" id="removeMe"> <!-- removing this will be removing its content too -->
      <ul>
      <li>#1</li>
      <li>#2</li>
    </ul>
  </div>
</div>

JavaScript

var p = $('#removeMe');

// The list will no longer be wrapped
// in a red div, when you uncomment VVV
//p.replaceWith(p.children())