Please tell me how to fix (or correct) the code so that when the focus is lost, the added class is removed from the element.
$(".flat-field" ) .focus( function() { $( this ).addClass('flat-field-focus'); } )
I tried using mouseleave, but it partially solved my problem.