JQuery Validation PlugIn - Event before/during validation
Is there an event with the jquery validator plug开发者_开发百科in that I hook into? It is a bit of a follow up to these questions:
CKEditor and ASP.Net MVC 3 RequiredAttribute
JQuery Validation PlugIn - submitHandler syntax
Basically I have a CKEditor that is not playing nice with jquery required validator. My thought was to hook into some event on validation so I can run this code:
var editor = $('#Body').ckeditorGet();
editor.updateElement();
I looked into submitHandler, but that doesn't happen until AFTER validation takes place.
Also, this is on asp.net MVC 3 although don't think that matters...
I had a similar problem and fixed it be adding code to the click handler of the input field like this
$('input[type=submit]').bind('click', function () {
var editor = $('#Body').ckeditorGet();
editor.updateElement();
});
精彩评论