JSFiddle - React, Tailwind, and code Playground
HTML
<a>this is the case</a>
JavaScript
$(function() {
var te = null;
$("a").bind("customevt", function(e) {
e.stopPropagation();
});
$(document).bind("mousemove", function(e) {
te = e;
setTimeout(latertrigger, 50);
});
var latertrigger = function() {
var event = jQuery.Event("customevt");
var el = $("a")[0];
var e = te;
$(el).trigger(event, ["p"]);
if(event.isDefaultPrevented()) {
e.preventDefault();
}
if(event.isPropagationStopped()) {
//at this point, e.originalEvent looks like has type, but loss track of reference.
//in IE, this makes that 'member not found' problem.
e.stopPropagation();
}
};
});