JSFiddle - React, Tailwind, and code Playground
HTML
<div class="F1">
<img src='resources/images/andremachado/del.png' width='25' title='Excluir insumos'/>
</div>
JavaScript
var x = 0;
function toogle_m(del){
if (del == 1) {
alert("Lucky 7!"+"x");
x = 0;
}
else{
alert("You're not very lucky today..."+"x");
x = 1;
}
}
$(document).ready(function(){
$('.F1').click(function(){
toogle_m(1);
});
});