Refactor to delete mousewheel.js.

This old third party library added support
for a "mousewheel" event to detect scrolling.
However, it is not compatible with jQuery 3
and is obsolete now that there is a standard
"wheel" event that accomplishes the same thing.
This commit is contained in:
Cory Lynch
2017-07-02 19:53:36 -04:00
committed by showell
parent ca14292334
commit 802ea9abf5
6 changed files with 13 additions and 100 deletions

View File

@@ -41,14 +41,14 @@
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
* - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**/
**/
(function( $ ){
$.fn.idle = function(options) {
var defaults = {
idle: 60000, //idle time in ms
events: 'mousemove keydown DOMMouseScroll mousewheel mousedown touchstart touchmove', //events that will trigger the idle resetter
events: 'mousemove keydown DOMMouseScroll mousedown touchstart touchmove wheel', //events that will trigger the idle resetter
onIdle: function(){}, //callback function to be executed after idle time
onActive: function(){}, //callback function to be executed after back from idleness
keepTracking: false //if you want to keep tracking user even after the first time, set this to true
@@ -117,5 +117,5 @@
elem.on(settings.events, handler);
return control;
};
};
})( jQuery );