$(document).ready(function () { // 职位卡片点击效果 /* $(".job-card").on("click", function () { const jobTitle = $(this).find(".job-title").text(); console.log("点击了职位:" + jobTitle); // 这里可以添加跳转到职位详情页的逻辑 // window.location.href = '/pages/service/job-detail.html?job=' + encodeURIComponent(jobTitle); }); */ // 卡片悬停动画增强 /* $(".job-card").hover( function () { $(this).addClass('featured'); $(this).find(".job-arrow").css({ transform: "translateX(4px)", }); }, function () { $(this).removeClass('featured'); $(this).find(".job-arrow").css({ transform: "translateX(0)", }); } ); */ // 福利图标悬停效果 $(".benefit-item").hover( function () { $(this).find(".benefit-icon").css({ transform: "scale(1.15) rotate(5deg)", }); }, function () { $(this).find(".benefit-icon").css({ transform: "scale(1) rotate(0)", }); } ); // 滚动动画 function animateOnScroll() { $(".job-card, .benefit-item").each(function () { const elementTop = $(this).offset().top; const elementBottom = elementTop + $(this).outerHeight(); const viewportTop = $(window).scrollTop(); const viewportBottom = viewportTop + $(window).height(); if (elementBottom > viewportTop && elementTop < viewportBottom - 100) { $(this).addClass("animate-in"); } }); } $(window).on("scroll", animateOnScroll); animateOnScroll(); // 初始检查 // 添加淡入动画 $("