Help!

Help!

I'm learning to use jquery, but am having difficulty in some fields.

I have a form where the input text has an image as background


<label>Label</label>
   <span class="Border-Left"></span>
      <span class="Background">
         <input type="Text" name="Name"/>
      </span>
   <span class="Border-Right"></span>

I wish that when the error appear, were added to the class "Error" in <span> (Border-Left, Background, Border-Right)

Excuse the bad English
Thanks.