文件阅览文件标题逻辑处理
This commit is contained in:
parent
70c4d1146e
commit
3a0f29f9f2
@ -90,8 +90,34 @@
|
|||||||
$('span').css({
|
$('span').css({
|
||||||
'font-family': 'Microsoft YaHei',
|
'font-family': 'Microsoft YaHei',
|
||||||
});
|
});
|
||||||
$("#RELEASE_INSTRUCTIONS_htmlRead p").slice(0, 3).remove();
|
//$("#RELEASE_INSTRUCTIONS_htmlRead p").slice(0, 3).remove();
|
||||||
|
|
||||||
|
// 遍历#RELEASE_INSTRUCTIONS_htmlRead下的所有<p>标签
|
||||||
|
if($("#RELEASE_INSTRUCTIONS_htmlRead p").length>0){
|
||||||
|
$('#RELEASE_INSTRUCTIONS_htmlRead p').each(function() {
|
||||||
|
// 检查当前<p>标签内的<span>标签是否为空
|
||||||
|
var hasNonEmptySpan = $(this).find('span').filter(function() {
|
||||||
|
return $.trim($(this).text()) !== '';
|
||||||
|
}).length > 0;
|
||||||
|
|
||||||
|
// 如果没有非空的<span>标签,则删除当前<p>标签
|
||||||
|
if (!hasNonEmptySpan) {
|
||||||
|
$(this).remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
$('#edithtml p').each(function() {
|
||||||
|
// 检查当前<p>标签内的<span>标签是否为空
|
||||||
|
var hasNonEmptySpan = $(this).find('span').filter(function() {
|
||||||
|
return $.trim($(this).text()) !== '';
|
||||||
|
}).length > 0;
|
||||||
|
|
||||||
|
// 如果没有非空的<span>标签,则删除当前<p>标签
|
||||||
|
if (!hasNonEmptySpan) {
|
||||||
|
$(this).remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user