根据滚动

时间:2017-11-05 14:45:48

标签: javascript jquery jquery-scrollify

我有滚动设置,以便它会在最后一部分禁用并正常滚动,但是当你反向回到最后一部分(即向上滚动而不是向下翻页)时它不会重新启用它自己

<script id="scrollify" src="assets/js/jquery.scrollify.js"></script>
<script>
  $(document).ready(function() {
    $.scrollify({
      interstitialSection : ".scroll-wrapper",
      updateHash: false,
      touchScroll:true,
      scrollSpeed: 1200,
    });
  });

  $(document).on('scroll', function(e){
    var top = $('.page-section:last').offset().top;
    var screenTop = $(document).scrollTop();
    if (top > screenTop && $.scrollify.isDisabled()) {
      $.scrollify.enable();
      $.scrollify.update();
    } else if (top < screenTop && !$.scrollify.isDisabled()) {
      $.scrollify.disable();
    }
  });
</script>

是否可以执行此功能的反向?

0 个答案:

没有答案