scrollify禁用向上滚动

时间:2018-03-20 16:35:57

标签: javascript jquery-scrollify

我尝试使用scrollify禁用向上滚动,我尝试使用此代码段,但它无法正常工作



$(window).scroll(function () {
  var iCurScrollPos = $(this).scrollTop();
  if (iCurScrollPos > iScrollPos) {
    if($.scrollify.isDisabled()) {
   $.scrollify.enable()

    }
    console.log('down')
  } else {
    console.log('up');
   $.scrollify.disable()

  }
    iScrollPos = iCurScrollPos;
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
&#13;
&#13;
&#13;

0 个答案:

没有答案