aria-hidden 질문좀 드릴께요
본문
아래 샘플코드에서
혹시 test1위에 마우스를 올리게되면
test1 aria-hidden="true"로
test2 aria-hidden="false"로 변경되게 하려면 어떤코드를 써야할까요?!
<div class="test1" aria-hidden="false">
<div class="test2" aria-hidden="true">
내용
</div>
</div>
답변 1
어떤의도에서 하시는지는 모르지만 일단 말씀하신 걸 토대로 스크립트 작성해 보면 이정도 될듯 합니다.
<script>
$(function(){
$(".test1").mouseover(function(){
$(this).attr('aria-hidden',true);
$(this).find('.test2').attr('aria-hidden',false)
});
});
</script>
답변을 작성하시기 전에 로그인 해주세요.