//만약에 reveal 클래스가 있는데 //글씨를 span으로 감싸주고 //글씨를 다 넣어줘요 함 document.querySelectorAll(".content__item__desc").forEach(desc => { let descAf = desc.innerHTML; //console.log(descAf); //console.log(descAf.includes("span")) if(descAf.includes("span")){ desc.innerHTML = descAf } else { let descBe = "" + descAf + ""; desc.innerHTML = descBe; } }) //document.querySelectorAll(".content__item__desc").forEach(d..
//글씨 쪼개기 //let text = document.querySelector("#section1 .content__item__desc"); //let splitText = text.innerText; //let splitWrap = splitText.split('').join(""); // splitWrap = "" + splitWrap + "" // text.innerHTML = splitWrap //alert(splitWrap) // 여러개 글씨 쪼개기 //for(let i=1; i { let splitText = desc.innerText; let splitWrap = splitText.split('').join(""); splitWrap = "" + splitWrap + "" desc.inne..
function scroll(){ let scrollTop = window.screenY || window.pageYOffset || document.documentElement.scrollTop; document.querySelector(".scrollTop span").innerText = Math.round(scrollTop); //const img = document.querySelector("#section1 .content__item__img"); //img.style.transform = "translateY("+scrollTop/10+"px)"; document.querySelectorAll(".content__item").forEach(item => { let offset1 = (scro..
//window.addEventListener("scroll", () => { // let scrollTop = window.screenY || window.pageYOffset || document.documentElement.scrollTop; // // document.querySelector(".scrollTop span").innerText = Math.round(scrollTop); //}) function scroll(){ let scrollTop = window.screenY || window.pageYOffset || document.documentElement.scrollTop; document.querySelector(".scrollTop span").innerText = Math.r..
// window.addEventListener("scroll", () => { // let scrollTop = window.screenY || window.pageYOffset || document.documentElement.scrollTop; // // 스크롤 값이 0보다 크면 show 클래스를 추가 // // if(scrollTop>0){ // // document.querySelector("#parallax__nav").classList.add("show") // // } else { // // document.querySelector("#parallax__nav").classList.remove("show") // // } // document.querySelector(".scrollTop ..
document.querySelectorAll("#parallax__dot a").forEach(el => { el.addEventListener("click", e => { e.preventDefault(); // window.scroll(0,1000); // window.scroll({left:0, top:1000}); // window.scroll({left:0, top:1000, behavior:"smooth"}); // window.scrollTo(0,1000); // window.scrollTo({left:0, top:1000}); // window.scrollTo({left:0, top:1000, behavior:"smooth"}); // window.scrollBy(0,1000); // w..
document.querySelectorAll("#parallax__nav li a").forEach(li => { li.addEventListener("click", (e) => { e.preventDefault(); document.querySelector(li.getAttribute("href")).scrollIntoView({ behavior:"smooth" }) }) }) window.addEventListener("scroll", () => { // let scrollTop = window.pageYOffset; // let scrollTop = document.documentElement.scrollTop; // let scrollTop = window.scrollY; let scrollTo..