$('.has-error').focus(function (e) { $(this).removeClass('has-error'); $(this).parent().find('.error').remove(); }); var sEmail = $('span#email').html(); $('span#email').html(sEmail.replace('+', '@'));