애니메션 문의합니다.

애니메션 문의합니다.

QA

애니메션 문의합니다.

본문

안녕하세요

 

와우에서 보면 스크롤내려면 한번만 실행되고 스크롤을 올리면 다시 재생이 안되는데요

혹시 스크롤 올리고 내릴때 마다 반복되게 하는 방법 알고 계신분 없나요?

 

도저히 못찾겠네요 ㅜㅜ

이 질문에 댓글 쓰기 :

답변 1

https://github.com/thesmart/jquery-scrollspy

여기서 다운받아서 /js 파일 에 넣어 주시고요 

 

https://gist.github.com/PaulGwamanda/bcdfd1adea5144fefa1a9d6939340b67

에서 내용을 wow 하단에 처럼 넣어 주시면 됩니다

위치에 따라 안나오실수 있으니 제일 하단에 넣으세요.

 

<script src="/js/scrollspy.js"></script>
<script type="text/javascript">
<!--
 WOW.prototype.addBox = function(element) {
    this.boxes.push(element);
  };

  // Init WOW.js and get instance
  var wow = new WOW();
  wow.init();

  // Attach scrollSpy to .wow elements for detect view exit events,
  // then reset elements and add again for animation
  $('.wow').on('scrollSpy:exit', function() {
    $(this).css({
      'visibility': 'hidden',
      'animation-name': 'none'
    }).removeClass('animated');
    wow.addBox(this);
  }).scrollSpy();


//-->
</script>

 

 

최송한데요 넣는데도 안되는데 왜 이럴까요? ㅜㅜ

<script src="wow.js"></script>
    <script src="scrollspy.js"></script>
    <script>

  WOW.prototype.addBox = function(element) {
    this.boxes.push(element);
  };

  // Init WOW.js and get instance
  var wow = new WOW();
  wow.init();

  // Attach scrollSpy to .wow elements for detect view exit events,
  // then reset elements and add again for animation
  $('.wow').on('scrollSpy:exit', function() {
    $(this).css({
      'visibility': 'hidden',
      'animation-name': 'none'
    }).removeClass('animated');
    wow.addBox(this);
  }).scrollSpy();

</script>

답변을 작성하시기 전에 로그인 해주세요.
전체 42
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT