jQuery制作tab选项卡和图文排行榜列表切换,适用于畅销小说和商品销量排行榜切换代码。
使用方法:
1、head引入css文件
<link type="text/css" href="css/style.css" rel="stylesheet" />
2、head引入js文件
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.SuperSlide.2.1.1.js"></script>
3、body引入HTML代码
<dl class="tab-rank">
<dt class="hd">
<h3 class="on"><a href="#">会员活动</a></h3>
<h3><a href="#">经验分享</a></h3>
</dt>
<dd class="bd">
<ul class="ulList">
<li class="t on">
<span class="num">1</span>
<div class="c">
<div class="pubpic">
<a href="#"><img src="images/1.jpg" /></a>
</div>
<div class="pubtitle">
<a href="#">品桃花,赢好礼</a>
<p>2013/02/15—2013/03/15</p>
</div>
</div>
</li>
<li class="t">
<span class="num">2</span>
<div class="c">
<div class="pubpic">
<a href="#"><img src="images/2.jpg" /></a>
</div>
<div class="pubtitle">
<a href="#">中华儿女孝心行动---“熬胶孝敬..</a>
<p>2012/02/02—2012/02/28</p>
</div>
</div>
</li>
<li class="t">
<span class="num">3</span>
<div class="c">
<div class="pubpic">
<a href="#"><img src="images/3.jpg" /></a>
</div>
<div class="pubtitle">
<a href="#">中国贫血关爱行动——复方阿胶浆..</a>
<p>2012/09/01—2012/09/30</p>
</div>
</div>
</li>
<li>
<span class="num">4</span>
<div class="c">
<div class="pubpic">
<a href="#"><img src="images/4.jpg" /></a>
</div>
<div class="pubtitle">
<a href="#">阿胶糕进厨房,健康美丽吃出来</a>
<p>2012/10/15—2012/12/31</p>
</div>
</div>
</li>
<li>
<span class="num">5</span>
<div class="c">
<div class="pubpic">
<a href="#"><img src="images/5.jpg" /></a>
</div>
<div class="pubtitle">
<a href="#">桃花姬阿胶糕,阿胶达人免费申领..</a>
<p>2011/04/01—2011/04/25</p>
</div>
</div></li>
<li>
<span class="num">6</span>
<div class="c">
<div class="pubpic">
<a href="#"><img src="images/6.jpg" /></a>
</div>
<div class="pubtitle">
<a href="#">秋冬滋补进行时,免费品尝东阿阿..</a>
<p>2012/09/16—2012/11/30</p>
</div>
</div>
</li>
</ul>
<ul class="ulList2">
<li class="t">
<div class="pic">
<img src="images/1.jpg" />
</div>
<div class="con">
<div class="title">
<a href="#">解密杨贵妃的倾城容颜,探寻阿胶文化的源远流长!</a>
</div>
</div>
</li>
<li class="n">
<div class="pic">
<img src="images/1.jpg" />
</div>
<div class="con">
<div class="title">
<a href="#">阿胶文化之旅,探寻阿胶滋补的秘密!!</a>
</div>
</div>
</li>
<li class="n">
<div class="pic">
<img src="images/1.jpg" />
</div>
<div class="con">
<div class="title">
<a href="#">天天吃鸡蛋不利女性健康</a>
</div>
</div>
</li>
<li class="n">
<div class="pic">
<img src="images/1.jpg" />
</div>
<div class="con">
<div class="title">
<a href="#">樱桃可治疗贫血带来的妇科病</a>
</div>
</div>
</li>
<li class="n">
<div class="pic">
<img src="images/1.jpg" />
</div>
<div class="con">
<div class="title">
<a href="#">桃花姬——吃出好身体,吃出好容颜</a>
</div>
</div>
</li>
<li class="n last">
<div class="pic">
<img src="images/1.jpg" />
</div>
<div class="con">
<div class="title">
<a href="#">桃花伊面春常驻,阿胶养容润枯颜</a>
</div>
</div>
</li>
</ul>
</dd>
</dl>
<script type="text/javascript">
jQuery(".tab-rank li").hover(function(){ jQuery(this).addClass("on").siblings().removeClass("on")},function(){ });
jQuery(".tab-rank").slide({ titCell:"dt h3", mainCell:"dd",autoPlay:false,effect:"left",delayTime:300 });
</script>