Html代码片段:
<div> <dt class="jotitle"> <span>{$vo.name}</span> <span class="desContr hand" key="{$key}">></span> </dt> <dd class="joconten desEffc bb{$key}"> <dl class="j_15"> <dt class="j_t"> 岗位描述 </dt> {$vo.description} </dl> </div>
.desEffc { display:none; }
Js片段:
$('.desContr').click(function() { var key = $(this).attr('key'); var str = '.bb' + key; $(str).toggleClass('desEffc'); })