jQuery点击小图片显示大图片
来源:互联网 发布:知乎每日精选 rss源 编辑:程序博客网 时间:2024/04/28 08:30
<style type="text/css">
.warp
{
width: 487px;
height: 194px;
overflow: hidden;
border: solid 1px #ccc;
position: relative;
top: 0px;
left: 0px;
background-color: #fafafa;
}
.warp img
{
border-width: 0px;
cursor: pointer;
position: relative;
top: 0px;
left: 0px;
}
.imgBig
{
float: left;
width: 360px;
height: 190px;
padding: 2px;
}
.imgLittle
{
float: right;
width: 108px;
height: 57px;
padding: 6px 5px 0 10px;
clear: right;
}
</style>
<script src="Jquery1.7.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
var $warp = $("#warp");
$warp.IsRunning = false;
var seconds = 500;
$warp.children("img").click(function () {
if ($warp.IsRunning) { return; }
$warp.IsRunning = true;
var $imgs = $("#warp").children("img");
$imgs.eq(2).css("marginTop", "63px").animate({ marginTop: "0px" }, { duration: seconds });
$imgs.eq(0).css({ position: "absolute", opacity: "0.5" }).animate({ width: "108px", height: "57px", left: "372px", top: "126px", opacity: "1" }, { duration: seconds });
$imgs.eq(1).css({ position: "absolute", left: "372px", top: "6px", opacity: "0.2", clear: "none" }).animate({ width: "360px", height: "190px", left: "-9px", top: "-5px", opacity: "1" }, { duration: seconds, complete: function () {
$imgs.eq(0).appendTo($("#warp"));
$imgs.eq(0).removeAttr("style").removeClass("imgBig").addClass("imgLittle");
$imgs.eq(1).removeAttr("style").removeClass("imgLittle").addClass("imgBig");
$warp.IsRunning = false;
}
});
});
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="warp" id="warp">
<img src="images/look1.jpg" alt="" class="imgBig" />
<img src="images/look2.jpg" alt="" class="imgLittle" />
<img src="images/look3.jpg" alt="" class="imgLittle" />
<img src="images/look4.jpg" alt="" class="imgLittle" />
</div>
</form>
</body>
- jQuery点击小图片显示大图片
- jquery 点击小图片出现大图片效果
- 点击小图片在本页显示大图片
- jquery特效---点击图片显示大图片效果
- 点击小图片显示相应的大图片的js的实现
- 放大镜点击小图片传入大图片地址
- jquery小图片左右滚动点击小图切换显示大图
- 鼠标滑过小图片显示层中大图片
- jquery 鼠标移到图片弹出浮动层显示大图片
- jquery插件之点击图片可以显示大图
- Jquery 点击图片在弹出层显示大图
- Jquery 点击图片在弹出层显示大图
- Jquery 点击图片在弹出层显示大图
- [转]Jquery 点击图片在弹出层显示大图
- Jquery 点击图片在弹出层显示大图
- 点击小图片弹出大图
- 实现页面上点击小图片,弹出大图片的效果
- jQuery实现点击缩略图显示大图片并带有左右滑动
- hdu 1027 不解释,好多方法,鄙人最近常做搜索,它就做个试验吧!
- 中华黑豹增强版木马分析
- Just note
- 鼠标移入图片显示对应内容
- 帧定界的基本方法
- jQuery点击小图片显示大图片
- tomcat 6中context.xml的加载顺序
- 怎么删除服务项
- [转]Discuz DIY高级技巧:模板中添加可拖拽区域
- 内核配置make menuconfig
- ORACLE 11g安装图解
- 链表相交
- [转]Discuz-x DIY教程 DIY 参数详解之[index=x]
- C#创建非矩形窗体