Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jquery-mousewheel

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery-mousewheel

A jQuery plugin that adds cross-browser mouse wheel support.

  • 3.1.13
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
199K
decreased by-2.68%
Maintainers
3
Weekly downloads
 
Created

What is jquery-mousewheel?

The jquery-mousewheel package is a jQuery plugin that adds cross-browser mouse wheel support. It allows you to capture mouse wheel events and respond to them in a consistent manner across different browsers.

What are jquery-mousewheel's main functionalities?

Basic Mouse Wheel Event Handling

This feature allows you to capture mouse wheel events on a specific element and log the delta value, which indicates the amount of scroll.


$(document).ready(function() {
  $("#element").on("mousewheel", function(event) {
    console.log("Mouse wheel event detected!");
    console.log("Delta: " + event.deltaY);
  });
});

Prevent Default Scrolling

This feature allows you to prevent the default scrolling behavior when a mouse wheel event is detected, which can be useful for custom scroll implementations.


$(document).ready(function() {
  $("#element").on("mousewheel", function(event) {
    event.preventDefault();
    console.log("Default scrolling prevented.");
  });
});

Custom Scroll Speed

This feature allows you to customize the scroll speed by multiplying the delta value with a custom speed factor and then adjusting the scroll position of the element.


$(document).ready(function() {
  $("#element").on("mousewheel", function(event) {
    var scrollSpeed = 10;
    var scrollAmount = event.deltaY * scrollSpeed;
    $(this).scrollTop($(this).scrollTop() - scrollAmount);
    event.preventDefault();
  });
});

Other packages similar to jquery-mousewheel

Keywords

FAQs

Package last updated on 15 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc