Fullpage 라이브러리 기본3

황승우·2021년 10월 9일
0

메소드를 이용해보자

afterLoad()

afterLoad: function(anchorLink,index)
화면이 전환되고 나서 실행 //화면이 전환되었는지 구분가능

만약 이것을 활용한다면

afterLoad: function (anchorLink, index) {
      if (index == 3) {
        alert("hi section 3");
      }

    }
코드를 입력하세요

afterSlideLoad()

afterSlideLoad(anchorLink,index,slideAnchor,slideIndex)
슬라이드 화면이 전환되고 난 후에 이벤트 발생

  afterSlideLoad: function (anchorLink, index, slideAnchor, slideIndex) {

      console.log("현재 슬라이드 번호는?" + (+ slideIndex + 1));
    }

profile
I' Will be FE Dev

0개의 댓글