function scroll_ani() { var window_height = $(window).height(); let num = 0; $(window).scroll(function() { num = 0; }); function ani(a, num, t) { var top = a.offset().top; if (top < (window_height + t - 100)) { a.addClass("wd-scroll-in"); setTimeout(()=>{ 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)").each(function() { ani($(this), num, t); }); if (window_height + t + 200 >= body_height) { $(".wd-scroll-animation:not(.wd-scroll-in)").each(function() { $(this).addClass("wd-scroll-in").addClass("wd-scrolled"); }); } } return { add: function(a) { $(a).addClass("wd-scroll-animation"); return this.add; }, init: function() { this.add("div[id^='w_common_text-']"); this.add(".w_fimg-000"); this.add(".w_fbtn-001"); this.add(".w_ficon-001"); this.add(".w_fline-001"); this.add("div[class*='c_portalResProduct_detail']"); this.add(".c_portalResMessage_form-01001"); this.add(".c_portalResProduct_list-01001001 .PhotoList_k1 li"); this.add(".c_portalResIntro_detail-01001"); this.add(".w_fimgbox-001"); this.add(".c_portalResNews_list-01001 .newList"); this.add(".c_portalResNews_detail-01001 .p_header"); this.add(".c_portalResNews_detail-01001 .p_dataSource"); this.add(".c_portalResNews_detail-01001 .p_summary"); this.add(".c_portalResNews_detail-01001 .p_articles"); this.add(".c_portalResNews_detail-01001 .p_PrevAndNext"); this.add(".c_portalResProduct_list-01001"); this.add(".c_portalResNews_list-01001 .p_articles"); this.add(".c_portalResEmploy_list-01001 .jobList"); this.add(".c_portalResProduct_list-01001 .p_Product"); this.add(".c_portalResSearch_total-01001"); this.add(".c_portalResPublic_websiteShare-01001 .iShare a"); this.add(".c_portalResEbizads_banner-01001 .ad-tit"); this.add(".c_portalResEbizads_banner-01001 .ad-line"); this.add(".c_portalResEbizads_banner-01001 .ad-sum"); this.add(".c_portalResProduct_category-01001 .cn_cateItem"); this.add(".c_portalResComplaintPage_detail-01001 p"); this.add(".c_portalResComplaintPage_detail-01001 h2"); setInterval(function() { handle(); }, 400); handle(); }, handle: handle }; } ; $(function() { var body = $("body"); if (isFrontEnv()) { body.addClass("wd"); var _sa = scroll_ani(); _sa.add(".c_portalResProduct_category-01001002"); _sa.add(".c_portalResProduct_list-01001019"); _sa.add(".c_portalResProduct_list-01001019 .hotitle"); _sa.add(".c_portalResProduct_list-01001019 .col-xs-12"); _sa.add(".advantagebox .col-xs-12"); _sa.add(".col-xs-12"); _sa.add(".pubTitle"); _sa.add(".zlItems"); _sa.add(".c_portalResBreadcrumb_nav-01001001"); _sa.init(); setTimeout(function() { body.addClass("wd-show"); }, 500); } else { body.addClass("make"); } });