JSFiddle - React, Tailwind, and code Playground

HTML

<div id="firstname" style="width:300px;height:300px; border:1px solid red">

JavaScript

$(function () {

      $('#firstname').live("click", function (e) {
        alert('clicked');

      });
    });

(function($) {
    $.eventReport = function(selector, root) {
        var s = [];
        $(selector || '*', root).andSelf().each(function() {
            var e = $.data(this, 'events');
            if(!e) return;
            s.push(this.tagName);
            if(this.id) s.push('#', this.id);
            if(this.className) s.push('.', this.className);
            for(var p in e) s.push('\n', p);
            s.push('\n\n');
        });
        return s.join('');
    }
    $.fn.eventReport = function(selector) {
        return $.eventReport(selector, this);
    }
})(jQuery);


    alert($('#firstname').attr('event'));
    alert($('#firstname').data('events'));
    alert($.eventReport('#firstname'));