JSFiddle - React, Tailwind, and code Playground

HTML

<div>foobar</div>
<br />
<br />
<br />
<br />
<br />
<div class="active">foobarr</div>

CSS

.active
    {
    background-color:#f00;
    color:#fff;    
}

JavaScript

//This should not work as the element does not exist until after the handler is being bound
$(".active").focusin(function(e) {
    $(this).text("focusin no live");
});

//This should work, as it should work for all future elements
$(".active").live("focusin", function() {
    $(this).text("focusin using live");
});

//This should not work as the element does not exist until after the handler is being bound
$(".active").click(function() {
   $(this).text("click no live");
});

//This should work as it should work for all future elements
$(".active").live("click", function() {
   $(this).text("click using live");
});

$("div").addClass("active");