Does anyone know why displaying a simple alert box in the following focus()
event handler never stops? I also tried focusin()
with the same result. Is the event being fired multiple times in a loop? I am running in Chrome
$('input[type=text]').focus(function() { // Also tried focusin(..)
alert('Focus');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
Input:
<input type="text" id="myinput"/>