newerton/jquery-mousewheel
Composer 安装命令:
composer require newerton/jquery-mousewheel
包简介
A jQuery plugin that adds cross-browser mouse wheel support.
关键字:
README 文档
README
A jQuery plugin that adds cross-browser mouse wheel support with delta normalization.
In order to use the plugin, simply bind the mousewheel event to an element.
It also provides two helper methods called mousewheel and unmousewheel that act just like other event helper methods in jQuery.
The event object is updated with the normalized deltaX and deltaY properties. In addition there is a new property on the event object called deltaFactor. Multiply the deltaFactor by deltaX or deltaY to get the scroll distance that the browser has reported.
Here is an example of using both the bind and helper method syntax:
// using on $('#my_elem').on('mousewheel', function(event) { console.log(event.deltaX, event.deltaY, event.deltaFactor); }); // using the event helper $('#my_elem').mousewheel(function(event) { console.log(event.deltaX, event.deltaY, event.deltaFactor); });
The old behavior of adding three arguments (delta, deltaX, and deltaY) to the event handler is now deprecated and will be removed in later releases.
The Deltas...
The combination of Browsers, Operating Systems, and Devices offer a huge range of possible delta values. In fact if the user uses a trackpad and then a physical mouse wheel the delta values can differ wildly. This plugin normalizes those values so you get a whole number starting at +-1 and going up in increments of +-1 according to the force or acceleration that is used. This number has the potential to be in the thousands depending on the device. Check out some of the data collected from users here.
Getting the scroll distance
In some use-cases we prefer to have the normalized delta but in others we want to know how far the browser should scroll based on the users input. This can be done by multiplying the deltaFactor by the deltaX or deltaY event property to find the scroll distance the browser reported.
The deltaFactor property was added to the event object in 3.1.5 so that the actual reported delta value can be extracted. This is a non-standard property.
See it in action
Using with Browserify
Support for browserify is baked in.
npm install jquery-mousewheel npm install jquery-browserify
In your server-side node.js code:
var express = require('express'); var app = express.createServer(); app.use(require('browserify')({ require : [ 'jquery-browserify', 'jquery-mousewheel' ] }));
In your browser-side javascript:
var $ = require('jquery-browserify'); require('jquery-mousewheel')($);
License
This plugin is licensed under the MIT License.
Copyright (c) 2013 Brandon Aaron
newerton/jquery-mousewheel 适用场景与选型建议
newerton/jquery-mousewheel 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 39.51k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「jquery」 「mouse」 「wheel」 「mousewheel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 newerton/jquery-mousewheel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 newerton/jquery-mousewheel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 newerton/jquery-mousewheel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Craft CMS 5 Form administrator with Database integration
Yii2 LightBox image galary widget uses Lightbox v2.10.0 by Lokesh Dhakar
This client allows you to implement referral programs using the Genius Referrals RESTful API.
Cropping widget yii2 by section. The widget supports transparent background png,gif
A jQuery plugin for panning and zooming elements using CSS3.
An extended bootstrap dropdown widget for Yii 2 with submenu drilldown.
统计信息
- 总下载量: 39.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 43
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2026-01-04