jquery 监测鼠标滚轮

    xiaoxiao2021-12-15  11

    <script src="http://cdn.bootcss.com/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js"></script> $('#map').bind('mousewheel', function(event, delta) { var dir = delta > 0 ? 'Up' : 'Down'; if (dir == 'Up') { console.log('向上滚动'); } else { console.log('向下滚动'); } return false; });
    转载请注明原文地址: https://ju.6miu.com/read-1000405.html

    最新回复(0)