
【Live Pick】Footrest Series GTF59 - Black
Product information for 【Live Pick】Footrest Series GTF59 - Black
$199.99
$143.9928% OFF
$(function () { $(".change_btn").click(function () { $(".change_btn").css("background","#ffffff00"); $(this).css("background","#ffffff30"); let index = $(".change_btn").index($(this)); console.info(index); $(".change_img").hide(); $(".change_img").eq(index).show(); }); $(".change_btn_m").click(function () { $(".change_btn_m").css("background","#ffffff00"); $(this).css("background","#ffffff30"); let index = $(".change_btn_m").index($(this)); console.info(index); $(".change_img_m").hide(); $(".change_img_m").eq(index).show(); }) }) #ModelBox{display: none;position: fixed;left: 0;top: 0; width: 100%;height: 100%;background: #0000007a;z-index: 100;padding: 5% 23%;} #ImgModel{position: relative;height: 100%;} #ImgModel>div {height: 100%;text-align: center;} #ImgModel>div>img{height: 100%} #ImgModel>span {cursor: pointer;position: absolute;top: 40%;width: 5%;text-align: center;font-size: 50px;font-family: cursive;font-weight: bold;color: white;} #ImgModel>ul {position: absolute;left: 30%;width: 40%;bottom: 1%;margin: 0;padding: 0;overflow: auto;} #ImgModel>ul>li {text-decoration: none;cursor: zoom-in;width: 14.5%;margin: 0 1%;display: block;opacity: 0.6;float: left;} #ImgModel>ul>li:hover {opacity: 1;} #ImgModel>ul>li>img{width: 100%} #guan{position: absolute;right: 1%;top: 9%;font-size: 35px;color: white;font-family: cursive;cursor: pointer} /*按钮的样式*/ .showModel {position: absolute;width: 14.2%;height: 70.4%;cursor: pointer;background: #ff000000;} .showModel1 {left: 4.5%;top: 15.3%;} .showModel2 {left: 19.9%;top: 15.3%;} .showModel3 {left: 35.25%;top: 15.3%;} .showModel4 {left: 50.55%;top: 15.3%;} .showModel5 {left: 65.95%;top: 15.3%;} .showModel6 {left: 81.35%;top: 15.3%;} @media screen and (max-width:800px) { #ModelBox {padding: 60% 1%;} #ImgModel>span {font-size: 37px;} #guan{font-size: 26px;} #ImgModel>ul>li {width: 31%;} .showModel {width: 31.3%;height: 64.5%;} .showModel2 {top: 17.2%;left: 1%;} .showModel3 {top: 17.2%;left: 34.6%;} .showModel4 {top: 17.2%;left: 67.5%;} } × < > $(function () { //手机端删除第一张和最后2张图 if (screen.height >= 800 && screen.width >= screen.height) {}else { let Imgs = $("#ImgModel>div"); let lis = $("#ImgModel>ul>li"); Imgs.eq(0).remove(); Imgs.eq(4).remove(); Imgs.eq(5).remove(); lis.eq(0).remove(); lis.eq(4).remove(); lis.eq(5).remove(); $(".showModel1").remove(); $(".showModel5").remove(); $(".showModel6").remove(); } let ind=0; $("#prevImg").click(function () { ind--; if(ind<0){ ind=($("#ImgModel>ul>li").length-1); } changeImg(ind); }); $("#nextImg").click(function () { ind++; if(ind>($("#ImgModel>ul>li").length-1)){ ind=0; } changeImg(ind); }); $("#ImgModel>ul>li").click(function () { let li = $(this); ind = $("#ImgModel>ul>li").index(li); changeImg(ind); }); //切换图片 function changeImg(index){ $("#ImgModel>div").hide(); $("#ImgModel>div").eq(index).show(); } //显示窗口 $(".showModel").click(function () { $("#ModelBox").fadeIn(300); let span = $(this); ind = $(".showModel").index(span); changeImg(ind); }); //esc隐藏 $(document).keyup(function(event) { switch (event.keyCode) { case 27: $("#ModelBox").fadeOut(300); } }) })












