how to validate a form which is loaded via AJAX
on page. i'm using jquery validate.js
. plugin. i call the validate function after the form is loaded via ajax, but it doesn't work.
jquery code :
$(document.body).on('click', '.submitBtn', function(){
var id=$(this).attr('id');
$("#form"+id).validate({
submitHandler: function() {
// do anything
}
});
});
Any help will be highly appreciated.