$(document).ready(function(){ $(".down_showpic").css("width",$(window).width()); $(window).resize(function(){ $(".down_showpic").css("width",$(window).width()); $(".pictio").width($("#picbbox").width()).height($("#picbbox").height()); });});var p_w;var p_h;$(".down_showpic>img").load(function(){ p_w=$(this).width(); p_h=$(this).height(); $(".pictio").width($("#picbbox").width()).height($("#picbbox").height()).css({top:$(this).position().top,left:0}).fadeTo(100, 0.05);})dragpic=-1;dragpicy=-1;$(".pictio").bind({ mousedown: function(e){ //e=event?event:window.event; dragpic=e.pageX || (e.clientX); dragpicy=e.pageY || (e.clientY); if (e.stopPropagation){ // this code is for Mozilla and Opera e.stopPropagation(); e.preventDefault(); }; }, mouseup: function(){ dragpic=-1; },mousemove: function(e){ if(dragpic>=0){ //e=event?event:window.event; dqsb=e.pageX || (e.clientX ); dqsby=e.pageY || (e.clientY ); $(".down_showpic").scrollLeft($(".down_showpic").scrollLeft()+(dragpic-dqsb)) $(document).scrollTop($(document).scrollTop()+(dragpicy-dqsby)) dragpic=dqsb dragpicy=dqsby } },mouseout: function(){ dragpic=-1; }});$(".arc_push1").click(function(){ $(".pictio").width($("#picbbox").width()).height($("#picbbox").height()); $(".down_showpic>img").css({"width":"auto","height":"auto"}); $(document).scrollTop($(".down_showpic").position().top); return false;});$(".arc_push2").click(function(){ w=p_w; h=p_h; boxw=$(window).width() boxh=$(window).height() $(".pictio").width(boxw).height(boxh-$(".downbom").height()); if(w(boxw/boxh)){ $(".down_showpic>img").css({"width":boxw,height:"auto"}); }else{ //$(".down_showpic>img").css("width",boxw); $(".down_showpic>img").css({"width":"auto","height":boxh-$(".downbom").height()}); } } $(document).scrollTop($(".down_showpic").position().top); return false;});$(".arc_push5").click(function(){ w=p_w; h=p_h; boxw=$(window).width() boxh=$(window).height() $(".pictio").width($("#picbbox").width()).height($("#picbbox").height()); if(wimg").css({"width":boxw,height:"auto"}); } $(document).scrollTop($(".down_showpic").position().top); return false;});
文件目录······
暂无数据
猜你喜欢
更多»
项目推荐
更多»
PDF电子书
更多»
Java多线程编程核心技术
(2)
Linux命令详解词典.pdf
(5)
深入Python3中文版
(0)
百度SEO一本通.pdf
(0)
mysql必知必会.pdf
(2)
疯狂JAVA讲义 pdf电子书
(3)
C# 图解教程pdf电子书
(3)
研磨设计模式 pdf电子书
(0)