"); $("body").append(banner4BoxHtml); flag = 0; } try { var boxScrollHtml = document.getElementById("boxScroll"); boxScrollHtml.innerHTML = itemTwo.innerHTML; $("#boxScroll").prepend("
  • "); $("#boxScroll").append("
  • "); } catch (err) {} //-banner4Box全局定義 var moveLeft; var imgWidth; var imgHeight; var screenWidth; var screenHeight; var imgIndex = $('.boxScroll').children('li').length; var imgMax = imgIndex - 2; //imgMove-function function Marquee() { if (itemTwo.offsetWidth - itemMove.scrollLeft <= 0) itemMove.scrollLeft = itemMove.scrollLeft - itemTwo.offsetWidth; else { itemMove.scrollLeft++; } } $('#imgMove img').hover(function() { clearInterval(imgScroll); }, function() { imgScroll = setInterval(Marquee, speed); }); //退回imgMove $('.boxExit img').click(function() { speed = 15; imgScroll = setInterval(Marquee, speed); $('.banner4Box').css({ 'display': 'none' }); }); //進入banner4Box $('#imgMove img').click(function() { speed = 999999; imgIndex = $(this).parent().parent().index(); $('.banner4Box').css({ 'display': 'block' }); $(window).resize(); }); $(window).resize(function() { imgWidth = $('.boxCon').width(); imgHeight = $('.boxCon').height(); screenWidth = $(document).width(); screenHeight = $(document).height(); if (screenWidth > screenHeight) { imgWidth = imgHeight * 3 / 2; } else { imgWidth = screenWidth * 0.6; imgHeight = imgWidth * 2 / 3; } imgIndex++; moveLeft = '-' + imgIndex * imgWidth; $('.boxScroll').stop().animate({ left: moveLeft }, 500); $('.boxScroll').css({ 'width': (imgMax + 2) * 100 + '%', 'left': -imgWidth + 'px' }); $('.boxCon').css({ 'width': imgWidth }); $('.subBox').css({ 'height': imgHeight }); }); //banner4Box-function $('.boxAfter').click(function() { imgIndex++; if (imgIndex > imgMax) { imgIndex = 1; $('.boxScroll').css('left', '0px'); $('.boxScroll').stop().animate({ left: -imgIndex * imgWidth }, 500); } else { $('.boxScroll').stop().animate({ left: -imgIndex * imgWidth }, 500); } }); $('.boxBefore').click(function() { imgIndex--; if (imgIndex < 1) { imgIndex = imgMax; $('.boxScroll').css('left', -(imgMax + 2) * imgWidth + 'px'); $('.boxScroll').stop().animate({ left: -imgIndex * imgWidth }, 500); } else { $('.boxScroll').stop().animate({ left: -imgIndex * imgWidth }, 500); } }); if (typeof(imgLazyloadLib) == "function") imgLazyloadLib($("#banner_style_04_1541236666472imgMove img")); });
    榮譽資質/Certificate of honor