JSFiddle - React, Tailwind, and code Playground

HTML

<button id="create">create new button</button>

<div><button class="hover">hover me</button></div>

JavaScript

var createBtn = $("#create");

createBtn.click(function() {
    $('div').append('<button class="hover">new hover button</button');  
    return false;        
}); 

$('div').on({
    mouseenter: function() {
        alert('you hovered the button!');
    },
    mouseleave: function() {
        alert('you removed the hover from button!');
    }
}, ".hover");