JSFiddle - React, Tailwind, and code Playground

by ipr101

HTML

<form>
<input type="text"/>
</form>
<div id="txt"></div>

CSS

#txt{
padding-right:1000px;
}

JavaScript

$('html,body').bind('mousedown mouseup mouseover mousemove', function(e){
    console.log(e.target);
   e.preventDefault();
   customFunction();
});

function customFunction(){
    $("#txt").html('test');
}