JSFiddle - React, Tailwind, and code Playground
HTML
<div class="onlyfire">
Do Something
</div>
JavaScript
function onlyfire() {
$(".onlyfire").click(function() {
var div = $(this);
var original = $(this).html();
div.html("Tap again");
$(".onlyfire").addClass("fire");
setTimeout(function(){
$(div).html(original);
$(".onlyfire").removeClass("fire");
}, 2000);
$(".fire").click(function(fire) {
alert("this should not be showing once the text is changed back to original");
});
return false;
});
};
onlyfire();