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', function () { this.userInput(); });
    };
    
    ClickEvent.prototype = function () {
        return {
            userInput: function () {
                console.log('user');
            },
            
            show: function () {
                console.log('show');
            }
        };   
    }();
    
    var c = new ClickEvent('event');