我有一個執行多次的函數。我想要使用jQuery調用函數多少次。我怎麼做?jQuery計算使用.each函數進行循環的次數
每當文本字段發生更改時,都調用showErrors函數。因此,根據頁面上文本字段的數量,我應該能夠找到調用showErrors的次數。我將如何檢測showErrors函數中的內容。
showErrors: function(errorMap, errorList) {
if ($formEl.find(".aimInput input").length == 2) {
// $('.validate').html(errorList[0]['message']);
$(".aimLocal .submit").removeClass("disabled");
$(C.options.currentPage).find('input[type="submit"]').removeAttr("disabled");
}
}
你的代碼是怎樣的? – Shyju 2012-08-15 20:05:05