您的位置 >>> 星想互联 >>> 课堂教学 >>> 教学案例
JQUERY实现TAB面板
点击数:2557  发布时间2013-04-23 21:29:44
<style>
ul li{
float:left;margin-right:10px;width:60px; 
}
div{
display:none 
}
.bg{
 background:#f90; display: block;border:1px solid #F00
}
p{
 clear:both;
}
</style>
<script src="jquery.min.js"></script>
<script>
$(function(){
 $("li").each(function(item){
  $(this).mouseover(function(){
   $("div").removeClass("bg")
   $("div:eq("+item+")").addClass("bg")
  })
 })
})
</script>
来源:星想互联