基于jQuery实现百度应用图文列表切换



38 149 50



特效描述:基于jQuery实现 百度应用 图文列表切换,基于jQuery实现百度应用图文列表切换

代码结构

1. 引入CSS

<link rel="stylesheet" href="css/zzsc.css" />

2. 引入JS

<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>

3. HTML代码

<div style="margin:50px auto; width:250px;">
<div class="s-index-side">
<div class="part weekly game-top10 cls">
<div class="title"><h3>游戏Top10</h3><span class="s-index-icon game-top10-icon">icon图标</span></div>
<ul class="weekly-list cls">
<li>
<div class="app-show-title"><span class="num s-index-org">1.</span><a href="http://51qianduan.com/">植物大战僵尸2(高清版)</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/1.png" alt="植物大战僵尸2(高清版)"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-8"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="植物大战僵尸2(高清版)" data-icon="images/1.png" data-type="game" data-size="33461069" data-versionname="1.0.4" data-versioncode="4" data-package="com.popcap.pvz2cthdbddk" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-30" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;装</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num s-index-org">2.</span><a href="http://51qianduan.com/">节奏大师</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/2.png" alt="节奏大师"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-6"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="节奏大师" data-icon="images/2.png" data-type="game" data-size="27834715" data-versionname="2.0.4.10" data-versioncode="13" data-package="com.tencent.game.rhythmmaster" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-02" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;装</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num s-index-org">3.</span><a href="http://51qianduan.com/">神庙逃亡2</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/3.png" alt="神庙逃亡2"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-9"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="神庙逃亡2" data-icon="images/3.png" data-type="game" data-size="25360687" data-versionname="1.3.2" data-versioncode="4503" data-package="com.imangi.templerun2" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-30" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;装</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">4.</span><a href="http://51qianduan.com/">地铁跑酷</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/4.png" alt="地铁跑酷"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-8"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="地铁跑酷" data-icon="images/4.png" data-type="game" data-size="21359627" data-versionname="2.10.4" data-versioncode="44" data-package="com.kiloo.subwaysurf" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-30" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;装</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">5.</span><a href="http://51qianduan.com/">天天爱消除</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/5.png" alt="天天爱消除"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-7"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="天天爱消除" data-icon="images/5.png" data-type="game" data-size="24309275" data-versionname="1.0.3.0" data-versioncode="11" data-package="com.tencent.peng" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-22" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;装</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">6.</span><a href="http://51qianduan.com/">天天酷跑</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/6.png" alt="天天酷跑"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-8"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="天天酷跑" data-icon="images/6.png" data-type="game" data-size="31396115" data-versionname="1.0.6.0" data-versioncode="10" data-package="com.tencent.pao" data-download_url="http://www.51qianduan.com//data/wisegame/cb148bef52629659/tiantiankupao_10.apk" data-updatetime="2013-09-13" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;装</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">7.</span><a href="http://51qianduan.com/">欢乐斗地主(完整版)</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/7.png" alt="欢乐斗地主(完整版)"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-9"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="欢乐斗地主(完整版)" data-icon="images/7.png" data-type="game" data-size="34738978" data-versionname="3.0.102" data-versioncode="32" data-package="com.qqgame.hlddz" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-24" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;装</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">8.</span><a href="http://51qianduan.com/">水果忍者</a></div>
<div class="app-show-block">
<a href="http://www.51qianduan.com//a/item?docid=3666615&pre=web_am_indexhot&pos=home_2015_7&f=home_2015_7" class="pic"><img src="images/8.png" alt="水果忍者"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-8"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="水果忍者" data-icon="images/8.png" data-type="game" data-size="34067302" data-versionname="1.8.6" data-versioncode="1807" data-package="com.halfbrick.fruitninja" data-download_url="http://51qianduan.com/" data-updatetime="2013-10-02" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;装</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">9.</span><a href="http://51qianduan.com/">保卫萝卜</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/9.png" alt="保卫萝卜"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-9"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="保卫萝卜" data-icon="images/9.png" data-type="game" data-size="49775047" data-versionname="1.1.1" data-versioncode="258" data-package="com.carrot.carrotfantasy" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-30" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;装</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">10.</span><a href="http://51qianduan.com/">消灭星星</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/10.png" alt="消灭星星"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-8"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="消灭星星" data-icon="images/10.png" data-type="game" data-size="2865622" data-versionname="2.0.3" data-versioncode="203" data-package="com.wpd.game.popstar" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-17" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;装</a>
</div>
</li>
</ul>
</div>
</div>
<script type="text/javascript">
$(function(){
$(".weekly-list li").bind("mouseenter",weekly_ani).bind("mouseleave",function(){clearTimeout($(this).data("setTime"));});
function weekly_ani(e){
var me=$(e.target).closest("li");
if(me.hasClass("current")) return;
var orili=me.parent().find(".current");
$(this).data("setTime",setTimeout(function(){weekly_move(me,orili,100,39)},150));
}
function weekly_move(me,orili,h,h2){
me.addClass("current");
$(".weekly-list li").unbind("mouseenter",weekly_ani);
setTimeout(function(){
var cur_h=me.height();
if(cur_h < h-2){
var cur_orih=orili.height();
var dh=Math.round((h-cur_h)/2.5);
me.css("height",cur_h+dh);
orili.css("height",cur_orih-dh);
setTimeout(arguments.callee,25);
}
else{
me.addClass("current").css("height",h);
orili.css("height",h2);
$(".weekly-list li").bind("mouseenter",weekly_ani);
orili.removeClass("current");
}
},25);
}
$(".weekly-list").find("li:first").addClass("current").animate({height:100}, 300);
});
</script>
<br>
<div style="text-align:center;clear:both">
</div>
</html>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 图片全屏 图片淡出淡进 图片淡出 图片淡进 二维码 图片延迟加载 图片延迟 图片加载 图片翻转 图片旋转 图片叠加 图片层叠 图片拖动 图片拖拽 图片放大镜 头像上传 图片上传 带缩略图的幻灯片 h5图片动画 h5图标动画 html5图片动画 html5图标动画 图片放大缩小 图片缩放 图片大小 图片放大 图片缩小 图片变大 图片变小 图片广告 地图 中国地图 世界地图 滚动切换 滚动条切换 滑动选项卡 滑动切换 旋转木马 图片旋转木马 文字旋转木马 旋转木马插件 图片滚动 图片滚动条 图片滑动 图片滑块 图片收缩展开 图片收缩 图片展开 纯图片轮播 图片轮播 图片切换 图片选项卡 图标选项卡 自动滚动图片轮播 图标导航 图标菜单 选项卡切换 选项卡 切换 tab切换 页面切换 选项卡插件 切换插件 背景切换 大图切换 滑动手风琴 手风琴 水平手风琴 垂直手风琴 图片手风琴 文字手风琴 手风琴插件 滑动星星打分 收缩展开 展开收缩 收缩 展开 图表 图片 图片插件 头像截图 其他 收缩菜单 收缩导航 图片切换 图片选项卡 图标选项卡 手风琴 水平手风琴 垂直手风琴 图片手风琴 文字手风琴 手风琴插件 图片文字 鼠标滑过 鼠标悬停 跟随鼠标移动

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到