<script>
//08각 섹션 텍스트 넣기
// let txt = $("#section1 .content-item-desc").text();
// let split = txt.split("").join("");
// // let split = txt.split("").join("-");
// split ="" + split + ""
// $("#section1 .content-item-desc").html(split).attr("aria-label",txt)
//08각 섹션 텍스트 넣기 반복
let txt = $(".content-item-desc")
txt.each(function () {
let text = $(this).text();
console.log(text);
let split = text.split("").join("");
split = "" + split + "";
$(this).html(split).attr("aria-label", txt);
})
//각 섹션 텍스트 자바스크립트
//08텍스트 효과
// $(window).scroll(function(){
// if($(window).scrollTop() > $("#section1").offset().top){
// $("#section1 .content-item-desc").addClass("show");
// }else{
// $("#section1 .content-item-desc").removeClass("show");
// }
// })
//08텍스트 효과 반복
// $(window).scroll(function(){
// $(".content-item").each(function(){
// if($(window).scrollTop() > $(this).offset().top){
// $(this).find(".content-item-desc").addClass("show");
// }else{
// $(this).find(".content-item-desc").removeClass("show");
// }
// })
// })
//순서대로 나타내기
$(window).scroll(function () {
if ($(window).scrollTop() >= $("#section1").offset().top) {
// $("#section1 .content-item-desc span").addClass("show");
$("#section1 .content-item-desc span").each(function (index) {
setInterval(function () {
$("#section1 .content-item-desc span").eq(index).addClass("show");
}, 100 * index)
})
} else {
$("#section1 .content-item-desc span").eq(index).removeClass("show");
}
})
</script>