$(function () { //map $(window).on('scroll', function () { var oTop = $('.dot6').offset().top, oHeight = $('.dot6').innerHeight(), screenScroll = $(window).scrollTop(), screenHeight = $(window).height(); if ((screenScroll < oTop + oHeight / 3 * 2) && (screenScroll + screenHeight > oTop + oHeight / 3)) { // $('.dot1 .name-box').addClass('show'); // $('.dot2 .name-box').addClass('show'); // $('.dot3 .name-box').addClass('show'); // $('.dot4 .name-box').addClass('show'); // $('.dot5 .name-box').addClass('show'); // $('.dot6 .name-father').addClass('show'); // $('.dot7 .name-box').addClass('show'); // $('.dot8 .name-box').addClass('show'); // $('.dot9 .name-box').addClass('show'); // $('.dot10 .name-box').addClass('show'); } }) // var dot1 = $('dot1 .round3'); // $('.map-dot .round3').hover(function () { // $('.name-father').removeClass('show'); // $(this).siblings('.name-father').addClass('show'); // // $('.dot1 .name-box').addClass('show'); // }) // $(".map-dot").hover(function () { // let title = $(this).data("title"); // let name = $(this).data("name"); // let thumb = $(this).data("thumb"); // let $alert = $(".alert"); // let top = $(this).css("top"); // let left = $(this).css("left"); // console.log(top + "," + left); // if (!thumb) { // thumb = "/static/gs/pic/core_service_img01.jpg" // } // $alert.find("img").attr("src", thumb); // $alert.find(".right").html(name); // $alert.find(".font").html(title); // // $(".name-box").css({"top":top,"left":left,"width":"2.9775rem"}); // }) $(".m-area li").click( function () { $(this).addClass('areaActive'); $(this).siblings().removeClass('areaActive'); let title = $(this).data("title"); let name = $(this).data("name"); let thumb = $(this).data("thumb"); let $alert = $(".alert"); $alert.find("img").attr("src", thumb); $alert.find(".right").html(name); $alert.find(".font").html(title); } ) //鏁板瓧++ $(window).on('scroll', function () { var oTop = $('.numbers').offset().top, oHeight = $('.numbers').innerHeight(), screenScroll = $(window).scrollTop(), screenHeight = $(window).height(); if (($('.timer').text() == "") && (screenScroll < oTop + oHeight / 3 * 2) && (screenScroll + screenHeight > oTop + oHeight / 3)) { $('.timer').each(count); console.log(1); } }) //鎵嬮鐞 if ($(window).width() > 1004) { $('.accordion .box .digitizing').hover(function () { $('.digitizing').stop().animate({ 'width': '33%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "23%", "left": "32.9%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "23%", "left": "55.3%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "23%", "left": "77.7%" }, 500, "easeInOutSine"); }, function () { $('.digitizing').stop().animate({ 'width': '25.2%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "25.2%", "left": "25%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "25.2%", "left": "50%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "25.2%", "left": "75%" }, 500, "easeInOutSine"); } ) $('.accordion .box .intelligent').hover(function () { $('.digitizing').stop().animate({ 'width': '23%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "33%", "left": "22.4%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "23%", "left": "55.3%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "23%", "left": "77.7%" }, 500, "easeInOutSine"); }, function () { $('.digitizing').stop().animate({ 'width': '25.2%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "25.2%", "left": "25%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "25.2%", "left": "50%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "25.2%", "left": "75%" }, 500, "easeInOutSine"); }) $('.accordion .box .globalization').hover(function () { $('.digitizing').stop().animate({ 'width': '23%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "23%", "left": "22.4%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "33%", "left": "44.8%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "23%", "left": "77.7%" }, 500, "easeInOutSine"); }, function () { $('.digitizing').stop().animate({ 'width': '25.2%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "25.2%", "left": "25%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "25.2%", "left": "50%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "25.2%", "left": "75%" }, 500, "easeInOutSine"); }) $('.accordion .box .green').hover(function () { $('.digitizing').stop().animate({ 'width': '23%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "23%", "left": "22.4%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "23%", "left": "44.8%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "33%", "left": "67.2%" }, 500, "easeInOutSine"); }, function () { $('.digitizing').stop().animate({ 'width': '25.2%' }, 500, "easeInOutSine"); $('.intelligent').stop().animate({ "width": "25.2%", "left": "25%" }, 500, "easeInOutSine"); $('.globalization').stop().animate({ "width": "25.2%", "left": "50%" }, 500, "easeInOutSine"); $('.green').stop().animate({ "width": "25.2%", "left": "75%" }, 500, "easeInOutSine"); }) } })