$(function(){
$('span a').click(
function(){
// 获取对象
var trObj = $(this).parent().parent().parent();
var targetObj = trObj.next();
// 展开或合起
targetObj.stop(true,true).toggle();
// 加减号切换
if($(this).text()=='+'){
$(this).text('-');
$(this).css({'font-weight':'bold','font-size':'24px','line-height':'10px'});
}else{
$(this).text('+');
$(this).css({'font-weight':'bold','font-size':'18px','line-height':'10px'});
}
});
});
<span><a href="#" style="font-weight: bold;font-size: 18px;width:10">+</a></span>
欢迎关注公众号:“架构一线”,定期分享一些实战心得,互联网前沿技术等.