errorPlacement: radio error message
Bonjour,
dans mon html, j'ai un radio
Code:
1 2 3 4 5 6
|
<td>
<input type="radio" name="Co" value="-1" class="Co" id="CoOui"/>OUI<br/>
<div id="dd"><input type="radio" name="Co" value="0" class="Co required" id="CoNon"/>NON
</div>
</td> |
dans mon fichier js:
Code:
1 2 3 4 5 6 7 8
|
$(".Co").valid({
errorPlacement: function(error, element)
{
if (element.attr('type') == 'radio'){
element = element.parent(); }
}
}); |
Je voudrais avoir mon méssage d'érreur après "NON"
mais il ne fonctionne pas, mon méssage est après la radio, avant "NON".
Quelqu'un peut m'aider? Merci