// function move1() { // var tgt = $("#main .section06 .imgbox.pc .img01 "); // tgt.x0 = $(tgt).position().left; // tgt.y0 = $(tgt).position().top; // tgt.speedx = 0.06; // tgt.radianx = 3.14; // tgt.distx = 20; // tgt.speedy = 0.05; // tgt.radiany = 0; // tgt.disty = 10; // tgt.inte = setinterval(function () { // $(tgt).css({ left: tgt.x0 + tgt.distx * math.sin(tgt.radianx) }); // $(tgt).css({ top: tgt.y0 + tgt.disty * math.sin(tgt.radiany) }); // tgt.radianx += tgt.speedx; // tgt.radiany += tgt.speedy; // }, 1000 / 30); // } function move2() { var tgt = $("#main .section06 .imgbox.pc .img02"); tgt.x0 = $(tgt).position().left; tgt.y0 = $(tgt).position().top; tgt.speedx = 0.03; tgt.radianx = 3.14; tgt.distx = 30; tgt.speedy = 0.05; tgt.radiany = 0; tgt.disty = 20; tgt.inte = setinterval(function () { $(tgt).css({ left: tgt.x0 + tgt.distx * math.sin(tgt.radianx) }); $(tgt).css({ top: tgt.y0 + tgt.disty * math.sin(tgt.radiany) }); tgt.radianx += tgt.speedx; tgt.radiany += tgt.speedy; }, 1000 / 30); } function move3() { var tgt = $("#main .section06 .imgbox.pc .img03"); tgt.x0 = $(tgt).position().left; tgt.y0 = $(tgt).position().top; tgt.speedx = 0.04; tgt.radianx = 3.14; tgt.distx = 15; tgt.speedy = 0.04; tgt.radiany = 0; tgt.disty = 15; tgt.inte = setinterval(function () { $(tgt).css({ left: tgt.x0 + tgt.distx * math.sin(tgt.radianx) }); $(tgt).css({ top: tgt.y0 + tgt.disty * math.sin(tgt.radiany) }); tgt.radianx += tgt.speedx; tgt.radiany += tgt.speedy; }, 1000 / 30); } function move4() { var tgt = $("#main .section06 .imgbox.pc .img04"); tgt.x0 = $(tgt).position().left; tgt.y0 = $(tgt).position().top; tgt.speedx = 0.05; tgt.radianx = 3.14; tgt.distx = 20; tgt.speedy = 0.04; tgt.radiany = 0; tgt.disty = 10; tgt.inte = setinterval(function () { $(tgt).css({ left: tgt.x0 + tgt.distx * math.sin(tgt.radianx) }); $(tgt).css({ top: tgt.y0 + tgt.disty * math.sin(tgt.radiany) }); tgt.radianx += tgt.speedx; tgt.radiany += tgt.speedy; }, 1000 / 30); } function move5() { var tgt = $("#main .section06 .imgbox.pc .img05 "); tgt.x0 = $(tgt).position().left; tgt.y0 = $(tgt).position().top; tgt.speedx = 0.02; tgt.radianx = 3.14; tgt.distx = 15; tgt.speedy = 0.03; tgt.radiany = 0; tgt.disty = 20; tgt.inte = setinterval(function () { $(tgt).css({ left: tgt.x0 + tgt.distx * math.sin(tgt.radianx) }); $(tgt).css({ top: tgt.y0 + tgt.disty * math.sin(tgt.radiany) }); tgt.radianx += tgt.speedx; tgt.radiany += tgt.speedy; }, 1000 / 30); } function move6() { var tgt = $("#main .section06 .imgbox.pc .img06 "); tgt.x0 = $(tgt).position().left; tgt.y0 = $(tgt).position().top; tgt.speedx = 0.04; tgt.radianx = 3.14; tgt.distx = 25; tgt.speedy = 0.03; tgt.radiany = 0; tgt.disty = 12; tgt.inte = setinterval(function () { $(tgt).css({ left: tgt.x0 + tgt.distx * math.sin(tgt.radianx) }); $(tgt).css({ top: tgt.y0 + tgt.disty * math.sin(tgt.radiany) }); tgt.radianx += tgt.speedx; tgt.radiany += tgt.speedy; }, 1000 / 30); } function move7() { var tgt = $("#main .section06 .imgbox.pc .img07 "); tgt.x0 = $(tgt).position().left; tgt.y0 = $(tgt).position().top; tgt.speedx = 0.05; tgt.radianx = 3.14; tgt.distx = 20; tgt.speedy = 0.05; tgt.radiany = 0; tgt.disty = 15; tgt.inte = setinterval(function () { $(tgt).css({ left: tgt.x0 + tgt.distx * math.sin(tgt.radianx) }); $(tgt).css({ top: tgt.y0 + tgt.disty * math.sin(tgt.radiany) }); tgt.radianx += tgt.speedx; tgt.radiany += tgt.speedy; }, 1000 / 30); } function move8() { var tgt = $("#main .section06 .imgbox.pc .img08 img"); tgt.x0 = $(tgt).position().left; tgt.y0 = $(tgt).position().top; tgt.speedx = 0.04; tgt.radianx = 3.14; tgt.distx = 22; tgt.speedy = 0.05; tgt.radiany = 0; tgt.disty = 20; tgt.inte = setinterval(function () { $(tgt).css({ left: tgt.x0 + tgt.distx * math.sin(tgt.radianx) }); $(tgt).css({ top: tgt.y0 + tgt.disty * math.sin(tgt.radiany) }); tgt.radianx += tgt.speedx; tgt.radiany += tgt.speedy; }, 1000 / 30); } function move9() { var tgt = $("#main .section06 .imgbox.pc .img09 img"); tgt.x0 = $(tgt).position().left; tgt.y0 = $(tgt).position().top; tgt.speedx = 0.03; tgt.radianx = 3.14; tgt.distx = 30; tgt.speedy = 0.05; tgt.radiany = 0; tgt.disty = 20; tgt.inte = setinterval(function () { $(tgt).css({ left: tgt.x0 + tgt.distx * math.sin(tgt.radianx) }); $(tgt).css({ top: tgt.y0 + tgt.disty * math.sin(tgt.radiany) }); tgt.radianx += tgt.speedx; tgt.radiany += tgt.speedy; }, 1000 / 30); } function move10() { var tgt = $("#main .section06 .imgbox.pc .img10 img"); tgt.x0 = $(tgt).position().left; tgt.y0 = $(tgt).position().top; tgt.speedx = 0.04; tgt.radianx = 3.14; tgt.distx = 25; tgt.speedy = 0.04; tgt.radiany = 0; tgt.disty = 15; tgt.inte = setinterval(function () { $(tgt).css({ left: tgt.x0 + tgt.distx * math.sin(tgt.radianx) }); $(tgt).css({ top: tgt.y0 + tgt.disty * math.sin(tgt.radiany) }); tgt.radianx += tgt.speedx; tgt.radiany += tgt.speedy; }, 1000 / 30); } function randomsort(a, b) { return math.random() > 0.5 ? -1 : 1; } $(window).load(function () { // move1(); // move2(); // move3(); // move4(); // move5(); // move6(); // move7(); // move8(); // move9(); // move10(); }); $(function () { var demofi1 = new countup("num1", 0, $("#num1").data("num"), 0, 3); var demofi2 = new countup("num2", 0, $("#num2").data("num"), 0, 2); var demofi3 = new countup("num3", 0, $("#num3").data("num"), 0, 4); //if ($(window).scrolltop()<1024) { // settimeout(function () { // demofi1.start(); // demofi2.start(); // demofi3.start(); // },1300); //} if ($(window).width() > 1560) { settimeout(function () { demofi1.start(); demofi2.start(); demofi3.start(); }, 1000) } $(window).scroll(function () { if ($(window).scrolltop() > $(window).height() * 0.1) { demofi1.start(); demofi2.start(); demofi3.start(); } if ( $(window).scrolltop() > $("#main .section02").offset().top - $(window).height() * 0.7 ) { $("#main .section02").addclass("active"); } if ( $(window).scrolltop() > $("#main .section08").offset().top - $(window).height() * 0.7 ) { $("#main .section08").addclass("active"); } //if ( // $(window).scrolltop() > // $("#main .section03 .title").offset().top - $(window).height() * 0.7 //) { // $("#main .section03 .title").addclass("active"); //} if ( $(window).scrolltop() > $("#main .section03 .intt1").offset().top - $(window).height() * 0.8 ) { $("#main .section03 .intt1").addclass("active"); } // if ( // $(window).scrolltop() > // $("#main .section03 .intt1").offset().top - $(window).height() * 0.7 // ) { // $("#main .section03 .intt1").addclass("active"); // } }); }); $(function () { // $("#main .section03 .tabpanel").each(function () { // $(this).find(".slide").slick({ // autoplay: true, // pauseonhover: false, // arrows: false, // dots: true, // }); // $(this).find(".slide").slick("slickpause"); // }); $(window).scroll(function () { // if ( // $(window).scrolltop() > $("#main .section03 .tabpanel.show").offset().top - $(window).height() * 0.7 // ) { // $(".section03 .slide").slick("slickplay"); // } }); // $("#main .section04 .sliderbox").slick({ // autoplay: true, // pauseonhover: false, // arrows: false, // dots: true, // }); // $("#main .section04 .sliderbox").slick("slickpause"); // $(window).scroll(function () { // if ( // $(window).scrolltop() > // $("#main .section04 .sliderbox").offset().top - // $(window).height() * 0.7 // ) { // $("#main .section04 .sliderbox").slick("slickplay"); // } // }); $("#main .section05 ul.sp").slick({ autoplay: false, pauseonhover: false, arrows: false, dots: true, }); $("#main .section05 ul.sp").slick("slickpause"); $(window).scroll(function () { if ( $(window).scrolltop() > $("#main .section05 ul.sp").offset().top - $(window).height() * 0.7 ) { $("#main .section05 ul.sp").slick("slickplay"); } }); var ww = $("#main .section03 .ttl .tabnavi li.on").width(); var left = $("#main .section03 .ttl .tabnavi li.on a").position().left; $("#main .section03 .ttl .tabnavi li.line").css({ width: ww, left: left }); $(window).resize(function () { var ww = $("#main .section03 .ttl .tabnavi li.on").width(); var left = $("#main .section03 .ttl .tabnavi li.on a").position().left; $("#main .section03 .ttl .tabnavi li.line").css({ width: ww, left: left, }); }); $("#main .section03 .ttl .tabnavi li:not(.line)").hover( function () { var ww = $(this).width(); var left = $(this).children("a").position().left; $("#main .section03 .ttl .tabnavi li.line").css({ width: ww, left: left, }); }, function () { var ww = $("#main .section03 .ttl .tabnavi.show li.on").width(); var left = $("#main .section03 .ttl .tabnavi.show li.on a").position() .left; $("#main .section03 .ttl .tabnavi li.line").css({ width: ww, left: left, }); } ); }); $(window).load(function () { $("#main .section03 .tabpanel ul.pc").masonry({ itemselector: "li", isfitwidth: true, columnwidth: function (containerwidth) { return containerwidth / 3; }, }); // $(".tabpanel").eq(0).addclass("show"); // var boxh = $("#main .section03 .tanbox .show").height(); // $("#main .section03 .tanbox").height(boxh); var ind = 0; // $(".tabnavi li a").on("click", function (e) { // $(".tabpanel") // .eq(0) // .find("li") // .eq(0) // .removeclass("wow fadeinup wow2") // .addclass("noani"); // $(".tabpanel") // .eq(0) // .find("li") // .eq(1) // .removeclass("wow fadeinup wow2") // .addclass("noani"); // $(".tabpanel") // .eq(0) // .find("li") // .eq(2) // .removeclass("wow fadeinup wow2") // .addclass("noani"); // $(".qd").removeclass("wow fadeinup").addclass("noani"); // console.log($(".tabpanel").eq(0)); // ind = $(this).parent("li").index(); // console.log(ind); // ind2 = $(this).parent("li").index() + 1; // $(".tabnavi li:nth-child(" + ind2 + ")") // .addclass("on") // .siblings() // .removeclass("on"); // $("#main .section03 li .sydh").hide(); // $("#main .section03 li ").addclass("act"); // if (!$(window).width() < 1200) { // e.preventdefault(); // } // tan_show(); // }); // $(window).resize(function () { // tan_show(); // }); // function tan_show() { // settimeout(function () { // wow = new wow({ // boxclass: "wow2", // animateclass: "animated", // offset: 0, // }); // wow.init(); // $(".tabpanel:eq(" + ind + ")") // .addclass("show") // .siblings(".tabpanel") // .removeclass("show"); // $("#main .section03 li ").removeclass("act"); // var boxh2 = $("#main .section03 .tanbox .show").height(); // $("#main .section03 .tanbox").height(boxh2); // }, 600); // return false; // } /*$('.tabnavi li a').click(function(){ settimeout(function () { $('.tabpanel:eq('+ind+')').addclass('show').siblings('.tabpanel').removeclass('show'); $("#main .section03 li ").removeclass('act'); var boxh2=$("#main .section03 .tanbox .show").height(); $("#main .section03 .tanbox").height(boxh2); }, 600); return false; });*/ $("#main .section02 > ul > li").click(function () { $(this).toggleclass("on").siblings("li").removeclass("on"); //return false; }); }); /*滚动*/ if ($(window).width() > 768) { // $(window).scroll(function () { // var tp = // $("#main .section03 .ttl .tabnavim").offset().top - // $(window).scrolltop(); // var tp2 = $("#main .section04").offset().top - $(window).scrolltop(); // if (tp <= 50) { // $("#main .section03 .ttl .tabnavim2") // .stop(true, false) // .addclass("act"); // } else { // $("#main .section03 .ttl .tabnavim2") // .stop(true, false) // .removeclass("act"); // } // if (tp2 <= 150) { // $("#main .section03 .ttl .tabnavim2") // .stop(true, false) // .removeclass("act"); // } // }); }