$('.nonenr').each(function(){
if($(this).text() == 0){
$(this).parent('div').remove();
}
});
这样就可以了,如果.nonenr内容为空,则删除父div,div可以换成自定义class。
$('.nonenr').each(function(){
if($(this).text() == 0){
$(this).parent('div').remove();
}
});
这样就可以了,如果.nonenr内容为空,则删除父div,div可以换成自定义class。