let scroll_animation = function(selectors, type) { let body = $("body"); if (!body.hasclass("wd-scroll-animation-init")) { $(" .e_h1-31,.e_h1-18,.s_line,#c_introl_detail_004_p_016-1667483487609 .e_richtext-20 p,.e_h1-13,#c_effect_022-1667542782047 .e_loop-6 .p_loopitem,.e_h1-9,#c_static_635_p_005-1667542215987 .e_loop-1 .p_loopitem,#c_recruit_list_010_p_012-1667547164412 .e_container-3,#c_recruit_list_010_p_012-1667547164412 .e_loop-10 .p_loopitem,.e_h1-39,#c_new_list_178_p_001-1667525277546 .e_loop-30 .p_loopitem,.e_h1-8,#c_new_list_168-1667548786427 .e_loop-1 .p_loopitem,#c_effect_022-1667542782047 .e_text-15,#c_effect_022-1667542782047 .e_loop-16 .p_loopitem,#c_new_list_181-1669717283504 .e_loop-1 .p_loopitem,#c_static_627_p_006-1667543830945 .e_text-18,#c_static_627_p_006-1667543830945 .e_loop-2,#c_static_627_p_006-1667543830945 .e_richtext-10,#c_effect_022-1667542782047 .e_loop-15 .p_loopitem,#c_effect_022-1667542782047 .e_richtext-19,#c_effect_022-1667542782047 .e_richtext-15,#c_new_list_184-1669730166698 .e_h1-19,#c_new_list_184-1669730166698 .e_richtext-22,#c_new_list_184-1669730166698 .e_loop-6 .p_loopitem,#c_effect_022-1667542782047 .e_richtext-18,#c_category_358_p_001-1669800433704 .e_loop-17 .p_loopitem,#c_new_list_087_p_040-1672385925545 .e_loop-48 .p_loopitem,#c_static_627_p_006-1667543830945 .e_loop-19 .p_list,#c_static_627_p_006-1667543830945 .btn-primary,#c_new_list_184-1669730166698 .e_loop-23 .p_loopitem,#c_new_list_181-16723921689130 .e_h1-14,#c_new_list_181-16723921689130 .e_line-15,#c_new_list_181-16723921689130 .e_richtext-16,#c_new_list_181-16723921689130 .e_loop-1 .p_loopitem,#c_static_635_p_005-1667542215987 .e_richtext-12,#c_effect_022-1667542782047 .e_richtext-16 p,#c_new_list_181-16723921689130 .e_loop-20,#c_new_list_181-16723921689130 .e_loop-34 .p_loopitem,#c_recruit_list_010_p_012-1667547164412 .e_loop-38").addclass("wd-scroll-animation"); body.addclass("wd-scroll-animation-init"); let num = 0; $(window).scroll(function() { num = 0; }); function ani(a, t) { var top = a.offset().top; if (top < ($(window).height() + t - 100)) { a.addclass("wd-scroll-in"); settimeout(function() { a.addclass("wd-scrolled"); }, 200 + num * 100); num++; } } function handle() { let t = $(window).scrolltop(); let body_height = body.height(); $(".wd-scroll-animation:not(.wd-scroll-in):not(.wd-no-scroll-animation)").each(function() { ani($(this), t); }); if ($(window).height + t + 200>= body_height) { $(".wd-scroll-animation:not(.wd-scroll-in):not(.wd-no-scroll-animation)").each(function() { $(this).addclass("wd-scroll-in").addclass("wd-scrolled"); }); } requestanimationframe(handle); } requestanimationframe(handle); } $(selectors).addclass("wd-scroll-animation").each(function() { if (type) { $(this).addclass(type) } }); return scroll_animation; };