-1
현재 URL 위치가 페이지의 링크와 일치하는지 테스트 할 수 있습니까? 또한 일치하는 링크의 부모 (또는 조부모님) div가 특정 div 클래스를 갖고 있는지 확인하는 방법이 있습니까?부모 및 조부모 div 클래스 검사
// find a-href on page with matching current location URL link
jQuery("*").find("a[href='"+window.location.href+"']").each(function(){
// if matching a-href's parent contains class .aaa
// then BBB action
// else if matching a-href's grand-parent contains class .bbb
// then CCC action
})});