JSFiddle - React, Tailwind, and code Playground

by djsbellini

HTML

Text - select a part of it and drag below

<hr>

<div id="drop">
  <div>
    drop here
    <p>child</p>
    parent
  </div>
</div>

CSS

.red {
    background-color: red;
}

#drop * {pointer-events: none;}

JavaScript

$('#drop').bind({
                 dragenter: function() {
                     $(this).addClass('red');
                 },
                 
                 dragleave: function() {
                     $(this).removeClass('red');
                 }
                });