캐러셀 슬라이드 시 이벤트 호출.. 채택완료
얼마전에도 글 올리긴 했는데
https://www.aptners.com/homepage/" rel="nofollow noreferrer noopener" target="_blank">https://www.aptners.com/homepage/
이 페이지를 제작하고 있습니다 ..!
그런데 자꾸 막혀서요 ㅠㅠ
다름이아니라 메인에 캐러셀 슬라이드가 넘어갈때마다
매번 텍스트에 페이드인 효과를 넣어주고싶은데 잘 안돼요 ..!
</p>
<p> $(document).ready(function(){</p>
<p> $(".carousel-item.active h1").hide();
$(".carousel-item.active").hide();
$(".carousel-item.active h1").fadeIn(3000);
$(".carousel-item.active p").fadeIn(5000);
$("#carouselExampleIndicators").on('slide.bs.carousel', function (){</p>
<p> // alert($(".carousel-item.active .title1").html());
//alert($(".carousel-item.active h1").html());
$(".carousel-item.active h1").fadeIn(3000);
$(".carousel-item.active p").fadeIn(5000);
});</p>
<p> });</p>
<p>
이건 한번밖에 이벤트가 발생하지않기도하고 잘 안되더라구요 ..ㅠㅠ
도움 부탁드립니다 .ㅠㅠ
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
4년 전
</p>
<pre>
<code>$("#carouselExampleIndicators").on('slide.bs.carousel', function (){
$(".carousel-item h1").hide();
$(".carousel-item p").hide();
$(".carousel-item.active h1").fadeIn(3000);
$(".carousel-item.active p").fadeIn(5000);
});</code></pre>
<p>
이런형태로 활성화 되지 않은 요소들은 감춰주셔야 이벤트가 발생시 페이드인 효과를 게속 볼수 있을듯 하네요
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인전체 질문 목록
채택
답변대기
답변대기
채택
답변대기