JSFiddle - React, Tailwind, and code Playground

HTML

<a href="#" class="event">Click Here</a>

JavaScript

var ClickEvent = function (event) {
    this.ev = $('.' + event);
    this.ev.on('click', this.userInput());
};

ClickEvent.protoype = function () {
    return {
        userInput: function () {
            console.log('user');
        },
        
        show: function () {
            console.log('show');
        }
    };   
}();

var c = new ClickEvent('event');
    c.show();