<!DOCTYPE html> 
<html> 
<head> 
<title>jQuery 鼠标滚轮插件 mousewheel</title> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<style type="text/css">
    .mousewheel {
        background: green;
        width: 200px;
        height: 200px;
    }
</style>
</head> 
<body>
    <div class="mousewheel"></div>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script>
<script src="https://cdn.bootcss.com/jquery-mousewheel/3.1.13/jquery.mousewheel.js"></script>
<script type="text/javascript">
    $('.mousewheel').bind('mousewheel', function(event, delta) {
        var dir = delta > 0 ? 'Up' : 'Down';
        if (dir == 'Up') {
            $('.mousewheel').text('Up');
        } else {
            $('.mousewheel').text('Down');
        }
    });
</script>
</body> 
</html> 

jQuery 鼠标滚轮插件 mousewheel



备注:欢迎加入web前端求职招聘qq群:668352707

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-12
  • 2021-11-05
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2021-07-13
相关资源
相似解决方案