[jQuery] Validate errorPlacement not working in IE 6 or 7
The code below produces my error message in the third column of my
form table using Firefox. However, it does not work in Internet
Explorer 6 or 7. The third column has a red * for required which is
removed by IE, but not replaced with the messages. Any ideas? Sample
code and part of the form is below.
$().ready(function() {
// validate the comment form when it is submitted
//$("#commentForm").validate();
// validate signup form on keyup and submit
$("#regFormStep1").validate({
errorPlacement: function(error, element) {
error.replaceAll( element.parent("td").next("td") );
},
rules: {
email: {email: true,
required: true,
minLength: 2
},
firstName: {required: true,
minLength: 2
},
.....
messages: {
email: {required: "Email Required",
minLength: "Your email must be at least two characters"
},
firstName: {
required: "First Name Required",
minLength: "Your first name must be at least two characters"
},
<form id="regFormStep1" name="regFormStep1" action="reg/"
method="post">
<table id="reg">
<tr>
<th><label for="email">Email:</label></th>
<td><input name="email" id="email" /></td>
<td class="errorCell">*</td>
</tr>
<tr>
<th><label for="title">Title:</label></th>
<td><input name="title" id="title" /></td>
<td class="errorCell"> </td>
</tr>