JSFiddle - React, Tailwind, and code Playground
HTML
Click textbox and blur
<input type="text" id="myModal" value="" placeholder"click and blur"/>
JavaScript
var number;
$('#myModal').on('click', function(e) {
number = 5;
//$(img).show();
}).on('blur', function (e) {
//$(img).hide();
alert(number)
//Uncaught ReferenceError: img is not defined
});