我想趕上滾動的事件或抓時滾動是溢出禁用:隱藏
$(document).on('scroll touchmove', function() {});
但該事件不工作touchmove。因爲我已經使用 overflow:hidden;
如何捕獲這些事件並使用自定義動畫而不是經典滾動。
我想趕上滾動的事件或抓時滾動是溢出禁用:隱藏
$(document).on('scroll touchmove', function() {});
但該事件不工作touchmove。因爲我已經使用 overflow:hidden;
如何捕獲這些事件並使用自定義動畫而不是經典滾動。
入住這
$(document).on('scroll touchmove', function() {
\t \t console.log('scroll working...');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<body style="min-height:1120px;"></body>
對不起,忘了補充說我已經使用overflow:hidden;在身體上 –
爲了在滾動上工作,您必須在頁面上滾動 –
是否有可能捕捉鼠標動作,就像您可以捕捉按鍵,然後是觸摸移動的解決方案 –
event.type會讓你抓起來。 – Jai
可能是這可以幫助你http://stackoverflow.com/questions/18748042/detect-scrolling-attempts-in-overflowhidden-page –