remove class help.

remove class help.

Hi,
I am new to jquery and am using a function to add an item when validating input I have not been able to remove the item! Can somone put me right on both the method and the removal.
Please
 
Function:
if (userVal == '' ) {
            $("#txtName").after('<br/><span class="error" style="background-color: darkred" >Name Req!</span>');
   hasError = true;
        }