开发者

How to remove all default styling in jquery validation error message?

How can I remove all default styling from error message? I need this document structure:

  <div class="error">
    <p>error message</p>
  </div>

I'm using this javascript

      errorElement: "p",
      wrapper: "div",  // a wrapper around the error message
      errorPlacement: function(error, element) {
        error.insertAfter(element)
        error.addClass('error');  // add a class to the wrapper

But getting

   <div class="error">
     <p class="error">error messa开发者_运维知识库ge</p>
   </div>

It also adds error class to input, which I don't need, How can I remove error class from paragraph and input?

thanks


$('div p.error').removeClass('error');
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜