답변 3개
채택된 답변
+20 포인트
마르스컴퍼니
Expert
7년 전
</p>
<p>$(function(){
var current = window.location.pathname;
$('li a').each(function(){
var link = '/' + $(this).attr('href');
if (current == link){
$(this).parent().addClass('active');
}
});
});</p>
<p>
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
7년 전
혹시 원하시는게 이런 거였나요? ㅎㅎ
테스트 링크입니다.
http://www.koreacraft.kr/test1.php" href="http://www.koreacraft.kr/test1.php">http://www.koreacraft.kr/test1.php
<script src="<a href="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>" target="_blank" rel="noopener noreferrer">https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script></a></p>
<p><script>
$(document).ready(function(){
$("li a").on("mousedown",function(){
$("li").addClass("active");
});
});
</script></p>
<p><style>
.active { list-style:none; }
</style></p>
<p>
<body></p>
<p><li>
<a href="#">aaa </a>
</li></p>
<p></body></p>
<p>
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인