감사합니다!! 알려주신대로 하니까 나오긴 했는데 if문으로 써서 else 일 때는 removeClass가 안 먹네요ㅠㅠㅠ
cate_no02 이 변수랑 cate_no01 변수랑 겹쳐지네여ㅠㅠ
var cate_no01 = [42,43,48,49,50,51,52,53,172,173,174,175,44,45,46,47,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,34,35];
var cate_no02 = [34,35];
if(link.indexOf(cate_no01[0]) != -1 || link.indexOf(cate_no01[1]) != -1 || link.indexOf(cate_no01[2]) != -1 || link.indexOf(cate_no01[3]) != -1 || link.indexOf(cate_no01[4]) != -1 || link.indexOf(cate_no01[5]) != -1 || link.indexOf(cate_no01[6]) != -1 || link.indexOf(cate_no01[7]) != -1 ||
link.indexOf(cate_no01[8]) != -1 || link.indexOf(cate_no01[9]) != -1 || link.indexOf(cate_no01[10]) != -1 || link.indexOf(cate_no01[11]) != -1 ||
link.indexOf(cate_no01[12]) != -1 || link.indexOf(cate_no01[13]) != -1 || link.indexOf(cate_no01[14]) != -1 || link.indexOf(cate_no01[15]) != -1 ||
link.indexOf(cate_no01[16]) != -1 || link.indexOf(cate_no01[17]) != -1 || link.indexOf(cate_no01[18]) != -1 || link.indexOf(cate_no01[19]) != -1 ||
link.indexOf(cate_no01[20]) != -1 || link.indexOf(cate_no01[21]) != -1 || link.indexOf(cate_no01[22]) != -1 ||
link.indexOf(cate_no01[23]) != -1 || link.indexOf(cate_no01[24]) != -1 || link.indexOf(cate_no01[25]) != -1 ||
link.indexOf(cate_no01[26]) != -1 || link.indexOf(cate_no01[27]) != -1 || link.indexOf(cate_no01[28]) != -1 ||
link.indexOf(cate_no01[29]) != -1 || link.indexOf(cate_no01[30]) != -1 ||
link.indexOf(cate_no01[68]) != -1 || link.indexOf(cate_no01[69]) != -1
) {
$('.xans-product-menupackage .list03_tab li:first-child').addClass('selected');
} else {
$('.xans-product-menupackage .list03_tab li:first-child').removeClass('selected');
}
if(link.indexOf(cate_no02[0]) != -1 || link.indexOf(cate_no02[1]) != -1 ) {
$('.xans-product-menupackage .list03_tab li:nth-child(2)').addClass('selected');
$('.xans-product-menupackage .list03_tab li:first-child)').removeClass('selected');
} else {
$('.xans-product-menupackage .list03_tab li:nth-child(2)').removeClass('selected');
}