Javascript TypeError:验证程序未定义Firefox中出现错误
我有以下表格: 但现在,一旦我点击“转到下一节”按钮,我就不会得到任何响应,也无法转到下一页,因为我遇到了以下错误 但是这个错误只发生在Firefox中。一旦我换上Chrome,它就开始工作了 这是示例HTML:Javascript TypeError:验证程序未定义Firefox中出现错误,javascript,jquery,google-chrome,firefox,Javascript,Jquery,Google Chrome,Firefox,我有以下表格: 但现在,一旦我点击“转到下一节”按钮,我就不会得到任何响应,也无法转到下一页,因为我遇到了以下错误 但是这个错误只发生在Firefox中。一旦我换上Chrome,它就开始工作了 这是示例HTML: <div class="section"> .... </div> <div class="section"> .... </div> <button type="button" class="bt
<div class="section">
....
</div>
<div class="section">
....
</div>
<button type="button" class="btn btn-warning">Go to Next Section</button>
你会做小提琴吗?你会做小提琴吗?
$('.btn-warning').click(function () {
var container = $(this).closest('.section');
var isValid = true;
$.each(container.find('.form-control'), function () {
$('form').validate().element($(this));
if (!$(this).valid()) {
isValid = false;
return false;
}
});
if (isValid) {
container.next('.section').show().find('input').first().focus();
container.hide();
} else {
container.find('.error').text('please complete');
}
});