我在博客博客中尝试做的是删除标签前包含种子片段的标签。
如:In:Moskow,seeds_ILO
html:
<div class='postmeta'>
<div class='seeds_remove'>
<b:loop values='data:post.labels' var='label'>
<span class='label_remove'><data:label.name/></span>
</b:loop>
<span class='publ'><b>Published on</b> <data:post.timestamp/></span>
<span class='pubb'><b>By:</b> <data:post.author/> </span>
<span class='publab'><b>In:</b><b:if cond='data:post.labels'><b:loop values='data:post.labels' var='label'><a expr:href='data:label.url' rel='tag'><data:label.name/></a><b:if cond='data:label.isLast != "true"'>, </b:if></b:loop></b:if></span>
</div>
</div>
&#13;
我的博客模板附带以下Jquery
$(document).ready(function(){
$(".seeds_remove .label_remove").each(function(){
var e=$(this).text();
if(e.substr(0,10).match("seeds")) {
e=e.replace("seeds_","");
$(this).html('<div class="seeds"><span class="item_seeds">'+e+"</span></div>")}
$(".seeds").parent(".label_remove").replaceWith(function(){
return $(this).contents()
});
$(".seeds_remove").replaceWith(function(){
return $(this).contents()
})
});
$(".widget.Label a").each(function(){
var e=$(this).text();
if(e.substr(0,10).match("seeds")){
e=e.replace("seeds_","");
$(this).html('<span class="tag_remove">'+e+"</span>");
$(".tag_remove").parent("a").remove()
}
});
$(".widget.Label span").each(function(){
var e=$(this).text();
if(e.substr(0,10).match("seeds")){
e=e.replace("seeds_","");
$(this).html('<span class="tag_remove">'+e+"</span>");
$(".tag_remove").parent("span").remove()
}
});
$(".label_remove").remove()
});
&#13;
请帮忙!