$(function(){ var windName = window.location.pathname; var time = setInterval(function() { var m = $(".e_text-3 a").attr("href"); if (m) { console.log(m); $(".e_text-3 a").each(function() { var l_m = $(this).attr("href") if (l_m == windName) { $(this).parents('.p_loopitem').addClass("active") } }); clearInterval(time); } }, 100); var windName = window.location.pathname; var time = setInterval(function() { var m = $(".e_text-2 a").attr("href"); if (m) { console.log(m); $(".e_text-2 a").each(function() { var l_m = $(this).attr("href") if (l_m == windName) { $(this).parents('.p_loopitem').addClass("active") } }); clearInterval(time); } }, 100); var windName = window.location.pathname; var time = setInterval(function() { var m = $(".e_text-7 a").attr("href"); if (m) { console.log(m); $(".e_text-7 a").each(function() { var l_m = $(this).attr("href") if (l_m == windName) { $(this).parents('.p_loopitem').addClass("active") } }); clearInterval(time); } }, 100); var windName = window.location.pathname; var time = setInterval(function() { var m = $(".e_text-5 a").attr("href"); if (m) { console.log(m); $(".e_text-5 a").each(function() { var l_m = $(this).attr("href") if (l_m == windName) { $(this).parents('.p_loopitem').addClass("active") } }); clearInterval(time); } }, 100); })