JSFiddle - React, Tailwind, and code Playground

HTML

<span>aaa</span>

JavaScript

$("span")
        .on("click", function(e) { $(this).trigger("customevent"); })
        .on("click.namespace", function(e) { console.log('click with a namespace'); })
        .on("customevent", function(e) { console.log('"click" without a namespace'); })
        .trigger("customevent");