mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-20 16:12:10 +02:00
01cc9111118854681fc3f7f472509eddbce1bd3d
Replace 'bind' with 'on', since it is the "preferred" way to attach event handlers since jQuery 1.7 http://api.jquery.com/bind/
jQuery Mouse Wheel Plugin
A jQuery plugin that adds cross-browser mouse wheel support.
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 callback
receives three extra arguments which are the normalized "deltas" of the mouse wheel.
Here is an example of using both the bind and helper method syntax:
// using bind
$('#my_elem').on('mousewheel', function(event, delta, deltaX, deltaY) {
console.log(delta, deltaX, deltaY);
});
// using the event helper
$('#my_elem').mousewheel(function(event, delta, deltaX, deltaY) {
console.log(delta, deltaX, deltaY);
});
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
Languages
PHP
37.2%
JavaScript
33.6%
HTML
24.5%
CSS
3%
Less
0.7%
Other
0.8%