I have input type = 'text' and using jQuery, every time this text field is blurred, I apply css ('background', 'red') to the text field. The problem is that when I try to debug the puttin code alert('test')and I click OK in the dialog box, the same dialog box appears with the “test”.
Is it just because clicking on OK is considered blurry from the text box or is it something more serious? Thanks in advance.
$('#input').blur(function(){
$(this).css('background','red');
alert('test');
}
source
share