$(function() { if(isFrontEnv()) { $("#c_static_001_P_2345-1667187504243 .e_loop-25 .p_list").prepend("").each(function() { let b = $("#c_static_001_P_2345-1667187504243 .e_richText-22"); b.addClass("fs-0"); $(this).find(".p_loopitem").first().addClass("current").end().click(function() { $(this).addClass("current").siblings().removeClass("current"); b.removeClass([0,1,2].reduce((a,b) => a + " fs-" + b, "")).addClass("fs-" + $(this).index()); }); }); } });