yuesu/Comja/showbox.js

(完整代码) 2KB

var isboxhover=false;var isimghover=false;var elwrap=document.createElement("div");elwrap.setAttribute("id","wrap");document.body.appendChild(elwrap);var elmodal=document.createElement("div");elmodal.setAttribute("id","zoomtu");elmodal.setAttribute("class","modal clearfix");document.body.appendChild(elmodal);$(function(){$("#content_img img").each(function(b){if($(this).parent()[0].tagName.toLowerCase()=="p"){$(this).parent().css("text-indent","0em")}else{if($(this).parent().parent()[0].tagName.toLowerCase()=="p"){$(this).parent().parent().css("text-indent","0em")}}var a=$(this)[0];var e=$(this);var c=0;if(typeof a.naturalWidth=="undefined"||a.naturalWidth==0){var d=new Image();d.src=a.src;d.onload=function(){c=d.width;if(c>480){e.hover(function(f){e[0].style.cssText=e[0].style.cssText+"filter:alpha(opacity=90);opacity:0.9;cursor:pointer"},function(f){e[0].style.cssText=e[0].style.cssText+"filter:alpha(opacity=100);opacity:1.0;cursor:pointer"})}}}else{c=a.naturalWidth;if(c>480){e.hover(function(f){e[0].style.cssText=e[0].style.cssText+"filter:alpha(opacity=90);opacity:0.9;cursor:pointer"},function(f){e[0].style.cssText=e[0].style.cssText+"filter:alpha(opacity=100);opacity:1.0;cursor:pointer"})}}});$("#content_img img").on("click",function(){var h=$(this).attr("src");var e=0;var c=0;var b=new Image();b.setAttribute("src",h);imgwidtho=b.width;imgheighto=b.height;if(imgwidtho>480&&!$(this).hasClass("contentimg_list")){$("#wrap").show();if(imgwidtho>1024){e=1024;c=imgheighto*(1024/imgwidtho)}else{e=imgwidtho;c=imgheighto}var g="<img src='"+h+"' width='"+e+"' height='"+c+"' border='0'  />";g=g+'<div class="oneCloseBtn"><a href="javascript:void(0);" rel="nofollow"></a></div>';var a=$("#zoomtu");a.html(g);a.width(e);a.height(c);var d=document.documentElement.clientHeight;var f=((d-(c+36))/2+$(document).scrollTop())+"px";if(c>d){a.css("top",f)}else{a.css("top",f)}a.css("margin-left","-"+(e+36)/2+"px");a.fadeIn("slow")}});$("#zoomtu").on("click",".oneCloseBtn",function(){$("#wrap").hide();$("#zoomtu").slideUp("slow")});$("#content_img img").hover(function(){isimghover=true},function(){isimghover=false});$("#zoomtu").hover(function(){isboxhover=true},function(){isboxhover=false});$(document).click(function(a){if(isboxhover==false&&isimghover==false){$("#wrap").hide();$("#zoomtu").slideUp("slow")}})});function showbigimg(h){var e=0;var c=0;var b=new Image();b.setAttribute("src",h);imgwidtho=b.width;imgheighto=b.height;if(imgwidtho>50){$("#wrap").show();if(imgwidtho>1024){e=1024;c=imgheighto*(1024/imgwidtho)}else{e=imgwidtho;c=imgheighto}var g="<img src='"+h+"' width='"+e+"' height='"+c+"' border='0'  />";g=g+'<div class="oneCloseBtn"><a href="javascript:void(0);" rel="nofollow"></a></div>';var a=$("#zoomtu");a.html(g);a.width(e);a.height(c);var d=document.documentElement.clientHeight;var f=$(document).scrollTop()+"px";if((d-(c+36))>0){f=((d-(c+36))/2+$(document).scrollTop())+"px"}if(c>d){a.css("top",f)}else{a.css("top",f)}a.css("margin-left","-"+(e+36)/2+"px");a.fadeIn("slow")}};

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。