JSFiddle - React, Tailwind, and code Playground

HTML

<p>i want click event don't have any effect on below square after it's dragged.  </p>
<div class="div"></div>

CSS

div{
    background-color:pink;
    width:60px;
    height:60px;
}
.orange{
    background-color:orange;
}

JavaScript

$(function(){
    $('div').draggable();
    $('div').click(function(){
        $(this).toggleClass('orange');
    });
});