JSFiddle - React, Tailwind, and code Playground

by sureshbm13

HTML

<div class="example" data-you="Hello Example">Example</div>

JavaScript

$(".example").append("<input  class='svgobjects'</input>")
var ifclicked=false;
    $(".svgobjects").on("mousedown", function(){
        console.log("clicked");
        ifclicked = true;
        alert(ifclicked);
    });
    console.log("ifclicked "+ifclicked);