JSFiddle - React, Tailwind, and code Playground

HTML

<input id="btn" type="button" value="show" onclick="new MyType().show();" />

JavaScript

function MyType() {
            var this$ = $(this), times = 0;
            this.show = function () {
                times++;
                this$.trigger("show", this); // will make a looped calling, should i use "onshow" for type name of event? but type name for click of html element is "click"
                $("#btn").val(times); // invalid, it is not 1
            }
        }