我有一張桌子,我想統計我隱藏了多少人。jQuery計數器問題
代碼:
<rich:jQuery query="ready(function() {
var i = 0;
jQuery('#inbox:_inboxTable_').find('span[title=isArchivedStatusPlusIncludeArchive]').each(function(i, o){
if (jQuery(this).text() == 'true+false'){
i++;
alert(i);
jQuery(this).parent().parent().parent().fadeOut();
}
jQuery('#inbox').find('span[title=documentProccesedCountTitle]').html(i+' documents are beeing processed to be removed from the inbox');
});
})"/>
對於一個頁面有10 TR,在我的測試7是由這部分代碼隱藏,但「i」是10,而不是7在最後一步...
我只是沒有線索......爲什麼? 有沒有人看到原因?
在此先感謝。
什麼是您的html? – kgiannakakis 2009-12-22 12:18:29
這是來自jsf的豐富數據表。 – 2009-12-22 12:21:49