js代码
<script type="text/javascript"> $(function(){ var tabNum=$(".important").find("li"); var contentNum=$(".contents").children(); var timer; $(tabNum).each(function(index){ $(this).hover(function(){ var that=$(this) timer=window.setTimeout(function(){ $(contentNum).eq(index).css({"display":"block"}); $(contentNum).eq(index).siblings().css({"display":"none"}); that.find("a").css({"background":"#FFF","color":"#fff"}); that.find("strong").show(); that.siblings().find("strong").hide(); that.siblings().find("a").css({"background":"#fff","color":"black"}); },100) },function(){ window.clearTimeout(timer); }) }) }) </script>