Blur only activates when you leave the input, so you can use it to remove focus again.
$('input').focus(function(){ $(this).css('box-shadow', '0px 0px 1px #ccc'); }); $('input').blur(function(){ $(this).css('box-shadow', 'none'); });
TheCrazyProfessor
source share