我有一张桌子,我想统计我隐藏了多少人。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