jquery实现图片背景循环切换,显示隐藏一个div。
<script type="text/javascript">
$(function(){
$("#table4").hide();
$(".o_record p span").toggle(function(){
$(this).addClass("o_span");
$("#table4").show();
},function(){
$(this).removeClass("o_span");
$("#table4").hide();
})
});
</script>
<stype type="text/css">
.o_layout .o_record p .o_span{ float:right; display:inline; width:60px; background:url(../images/0918010340704_easyicon_net_16.png) no-repeat right;cursor:pointer;}
.o_up{ float:right; display:inline; width:60px;background:url(../images/0918010354231_easyicon_net_16.png) no-repeat right; cursor:pointer;}
.o_layout .o_record .table4{margin-top:10px;}
</style>
<div class="o_record">
<p><i class="r_icon"></i>操作历史记录<span class="o_up">| 展开</span></p>
<div class="table4" id="table4">
<table>
<tbody>
<tr>
<th class="col_width2">操作者</th>
<th class="col_width2">操作时间</th>
<th class="col_width2">操作状态</th>
<th>备注</th>
</tr>
</tbody>
<tbody> <tr>
<th class="col_width2"></th>
<th class="col_width2"></th>
<th class="col_width2"></th>
<th></th>
</tr></tbody>
</table>
</div>
</div>