JSFiddle - React, Tailwind, and code Playground

HTML

<div class="object1">This is the first object.</div>
<div class="object2">This is the 2nd object.</div>

JavaScript

$(document).ready(function(){
    $('.object1').click(function(){
        alert('I was clicked.');
    });
  
    $('.object2').click($('.object1').data('events').click[0]);
});