$(document).ready(function(){ $('.photo_slider').each(function(){ var $this = $(this).addClass('photo-area'); var $img = $this.find('img'); var $info = $this.find('.info_area'); var opts = {}; $img.load(function(){ opts.imgw = $img.width(); opts.imgh = $img.height(); }); opts.orgw = $this.width(); opts.orgh = $this.height(); $img.css ({ marginLeft: "-150px", marginTop: "-150px" }); var $wrap = $('
').append($img).prependTo($this); var $open = $('More Info >').appendTo($this); var $close = $('Close').appendTo($info); opts.wrapw = $wrap.width(); opts.wraph = $wrap.height(); $open.click(function(){ $this.animate({ width: opts.imgw, height: (opts.imgh+30), borderWidth: "10" }, 600 ); $open.fadeOut(); $wrap.animate({ width: opts.imgw, height: opts.imgh }, 600 ); $(".info_area",$this).fadeIn(); $img.animate({ marginTop: "0px", marginLeft: "0px" }, 600 ); return false; }); $close.click(function(){ $this.animate({ width: opts.orgw, height: opts.orgh, borderWidth: "1" }, 600 ); $open.fadeIn(); $wrap.animate({ width: opts.wrapw, height: opts.wraph }, 600 ); $img.animate({ marginTop: "-150px", marginLeft: "-150px" }, 600 ); $(".info_area",$this).fadeOut(); return false; }); });});
文件目录······
暂无数据
猜你喜欢
更多»
项目推荐
更多»
PDF电子书
更多»
Java多线程编程核心技术
(2)
Linux命令详解词典.pdf
(5)
深入Python3中文版
(0)
百度SEO一本通.pdf
(0)
mysql必知必会.pdf
(2)
疯狂JAVA讲义 pdf电子书
(3)
C# 图解教程pdf电子书
(3)
研磨设计模式 pdf电子书
(0)