ok so i am using the jquery validator plugin:


in the error placement function, I want to add the image before the input text box, but this doesnt seem to be working

here is the portion of my js
$(document).ready(function() { $(".error_image").css('visibility',"hidden");
var validator = $("#main_form").validate({
// the errorPlacement has to take the table layout into account
errorPlacement: function(error, element) {

note that if i undo the // in error placement, that works..

Here is my HTML code

 <div class="form_element">
<span class="error_image">
          <img src="expired.png"/>
 <label for="first_name_r">First Name*</label>
<input id="first_name_r" type="text" placeholder="John" name="first_name_r"  autofocus/>
                <div class="field_status"></div>