1. hamsterjs
A standalone javascript library for cross-browser mouse wheel support.
hamsterjs
Package: hamsterjs
Created by: monospaced
Last modified: Sat, 18 Jun 2022 18:49:41 GMT
Version: 1.1.3
License: MIT
Downloads: 18,457
Repository: https://github.com/monospaced/hamster.js

Install

npm install hamsterjs
yarn add hamsterjs

Hamster.js

A standalone javascript library for cross-browser mouse wheel support.

See it in action.

Usage

The event callback receives 3 extra arguments which are the normalized “deltas” of the mouse wheel.

 var hamster = Hamster(el);

hamster.wheel(function(event, delta, deltaX, deltaY){
  console.log(delta, deltaX, deltaY);
});

// destroy
hamster.unwheel();

Support

No jQuery or other libraries required, but an adapter for AngularJS is available.

Tested in these core browsers.

Install

bower install hamsterjs

Demo

monospaced.github.io/hamster.js

Reference

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin