tags:

views:

19

answers:

1

I have $(this) pointing at my input box but cannot seem to reference the surrounding span to add a red border.

<span id="hdr-su_name" class="eforminput">
    <input type="text" size="30" id="su_name" name="su_name">
</span>

I have tried this but does not work:

$(this).parent().css({'border-color':'1px solid #ff0000'}); 

Any help much appreciated !

+2  A: 
$(this).parent().css({'border':'1px solid #ff0000'}); 
volkan er
Ah, of course, error in my CSS not the JQuery, thanks !!
Wright-Geek