$(".open-platform-API .green").mouseenter(function () { $(this).addClass("green-active"); }); $(".open-platform-API .green").mouseleave(function () { $(this).removeClass("green-active"); }); $(".open-platform-API .purple").mouseenter(function () { $(this).addClass("purple-active"); }); $(".open-platform-API .purple").mouseleave(function () { $(this).removeClass("purple-active"); }); $(".open-platform-API .yellow").mouseenter(function () { $(this).addClass("yellow-active"); }); $(".open-platform-API .yellow").mouseleave(function () { $(this).removeClass("yellow-active"); }); $(".open-platform-API .orange").mouseenter(function () { $(this).addClass("orange-active"); }); $(".open-platform-API .orange").mouseleave(function () { $(this).removeClass("orange-active"); }); $(".open-platform-API .link a").mouseenter(function () { $(".open-platform-API .link a").css("color", "#d19b00"); $(".open-platform-API .link a g g").attr("stroke", "#d19b00"); }); $(".open-platform-API .link a").mouseleave(function () { $(".open-platform-API .link a").css("color", "#262626"); $(".open-platform-API .link a g g").attr("stroke", "#262626"); }); $(".open-platform-API .link a").on("click", function () { $(".open-platform-API .link a").css("color", "#d19b00"); $(".open-platform-API .link a g g").attr("stroke", "#d19b00"); }); if (screen.width < 768) { $(".open-platform-API .link a svg").attr("width", "12px"); $(".open-platform-API .link a svg").attr("height", "9px"); $(".open-platform-scene .scene-img .scene-content").css("display", "none"); } else { $(".open-platform-API .link a svg").attr("width", "16px"); $(".open-platform-API .link a svg").attr("height", "12px"); $(".open-platform-scene .scene-img .scene-content").css("display", "block"); } window.addEventListener("resize", () => { if (screen.width < 768) { $(".open-platform-API .link a svg").attr("width", "12px"); $(".open-platform-API .link a svg").attr("height", "9px"); $(".open-platform-scene .scene-img .scene-content").css("display", "none"); } else { $(".open-platform-API .link a svg").attr("width", "16px"); $(".open-platform-API .link a svg").attr("height", "12px"); $(".open-platform-scene .scene-img .scene-content").css("display", "block"); } }); function handlePlatformScroll() { if (window.scrollY >= 300) { $(".open-platform-scene .scene-img").addClass("scene-img-init"); $(".open-platform-scene .scene-img .scene-content").addClass( "scene-content-init" ); $( ".open-platform-scene .scene-img .scene-content .function-list .section1" ).addClass("section1-init"); $( ".open-platform-scene .scene-img .scene-content .function-list .section2" ).addClass("section2-init"); $( ".open-platform-scene .scene-img .scene-content .function-list .section3" ).addClass("section3-init"); window.removeEventListener("scroll", handlePlatformScroll); } } window.addEventListener("scroll", handlePlatformScroll);