// JavaScript Document $(function(){ //$(".fff").css("width",$(window).css("width")) $(".nav").find("li").mouseenter(function(){ $(this).addClass("cheng") var This=$(this) if($(this).find(".fff").length>0){ $(this).find("a").siblings().show() } }) $(".nav").find("li").mouseleave(function(){ $(".nav").find("li").removeClass("cheng") $(".yyjj,.fff").hide() }) $("#chakan").click(function(){ var imgW=parseInt($(this).css("width")) var imgH=parseInt($(this).css("height")) $(".bigpicBox").show().find("img").attr("src",$("#chakan").attr("src")).stop().animate({"width":imgW *1.7 +"px"},500) //$("html,body").css({"background-color":"#000"}) $(".bigpicBox").css({"left":"50%","top":"0%","margin-left":-0.8*imgW +"px","z-index":"100"}) $(".bigpicBox").find("div").css({"width":imgW *1.7 +"px","height":imgH+"px"}) $(".xx").css({"top":$(".bigpicBox").css("top"),"right":-41+"px","z-index":"101"}).show() $("#bigpicBox").css({"width":$(window).width(),"height":$(document).height(),"z-index":"99","opacity":"0.8"}).show() }) $("#chakan100").click(function(){ var imgW=parseInt($(this).css("width")) var imgH=parseInt($(this).css("height")) $(".bigpicBox").show().find("img").attr("src",$("#chakan100").attr("src")).stop().animate({"height":$(window).height()},500) //$("html,body").css({"background-color":"#000"}) var leftImg=parseInt($(window).height()) * imgW / imgH console.log(imgW,imgH,leftImg) $(".bigpicBox").css({"left":"50%","top":"0%","margin-left":-leftImg /2 +"px","z-index":"100"}) $(".bigpicBox").find("div").css({"width":leftImg +"px","height":$(window).height()}) $(".xx").css({"top":$(".bigpicBox").css("top"),"right":-40+"px","z-index":"101"}).show() $("#bigpicBox").css({"width":$(window).width(),"height":$(document).height(),"z-index":"99","opacity":"0.8"}).show() }) $("#chakan2,#chakan3").click(function(){ $("#chakan").click() $("#chakan100").click() }) $(".download").attr("href",$("#chakan").attr("src")) $(".bigpicBox").find("img").click(function(){ $(".bigpicBox,#bigpicBox,.xx").hide() }) $(".xx").click(function(){ $(".bigpicBox,#bigpicBox,.xx").hide() }) $("#down").parent("a").css("text-decoration","none") })