Reputation: 395
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 !
Upvotes: 2
Views: 292