开发者

How to place jQuery Validate error message after the label?

I am using jQuery Validate and need to place the error message AFTER the label element. Currently, it's just inserting it after the input and before the element.

Can someone tell me how do this?

<td>
    <input type="text" id="name" name="name" class="text">
    <label for="name">Name</label>
</td>

errorElement: "div",
errorPlacement: function(error, element) {
   开发者_如何学编程 $(element).after(error);
},


This may help

$(element).next().after(error);

Demo : http://jsfiddle.net/sparkup/behLgebw/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜