JQuery Validation Plugin help

I am trying to use the validation plugin for JQuery to validate a form, but I want it to not only show an error message, but also change the css for the td above it. I currently have function myErrorHandle(element) { element.closest("td").addClass("fsValidationError"); } $("#fsForm691575").validate({ errorPlacement: myErrorHandle, rules: { field7014601: { required: true } }); Where fsForm691575 is my form and field7014601 is just a name field. I just sort of hacked the myErrorHandle function together from another suggestion I found, so if I can do away with that but still get the desired effect, that would be nice. Thanks

以上就是JQuery Validation Plugin help的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准