{"id":13757375,"url":"https://github.com/jquery/jquery-mousewheel","last_synced_at":"2025-05-12T05:30:40.923Z","repository":{"id":441462,"uuid":"63557","full_name":"jquery/jquery-mousewheel","owner":"jquery","description":"A jQuery plugin that adds cross-browser mouse wheel support.","archived":false,"fork":false,"pushed_at":"2025-03-24T16:49:21.000Z","size":520,"stargazers_count":3904,"open_issues_count":10,"forks_count":1683,"subscribers_count":170,"default_branch":"main","last_synced_at":"2025-05-12T02:45:02.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jquery.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2008-10-16T01:30:34.000Z","updated_at":"2025-05-09T10:33:21.000Z","dependencies_parsed_at":"2023-07-05T14:56:00.435Z","dependency_job_id":"36736139-3a0b-4a06-867d-3a2cef8b33d0","html_url":"https://github.com/jquery/jquery-mousewheel","commit_stats":{"total_commits":178,"total_committers":16,"mean_commits":11.125,"dds":0.6460674157303371,"last_synced_commit":"d63d16e0b6a63c044c70001698c6c8ebcc341fc6"},"previous_names":["brandonaaron/jquery-mousewheel"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jquery%2Fjquery-mousewheel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jquery%2Fjquery-mousewheel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jquery%2Fjquery-mousewheel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jquery%2Fjquery-mousewheel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jquery","download_url":"https://codeload.github.com/jquery/jquery-mousewheel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253672731,"owners_count":21945482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T12:00:34.709Z","updated_at":"2025-05-12T05:30:40.888Z","avatar_url":"https://github.com/jquery.png","language":"HTML","readme":"# jQuery Mouse Wheel Plugin\n\nA [jQuery](https://jquery.com/) plugin that adds cross-browser mouse wheel support with delta normalization.\n\nIn order to use the plugin, simply bind the `mousewheel` event to an element.\n\nThe event object is updated with the normalized `deltaX` and `deltaY` properties.\nIn addition, there is a new property on the event object called `deltaFactor`. Multiply\nthe `deltaFactor` by `deltaX` or `deltaY` to get the scroll distance that the browser\nhas reported.\n\nHere is an example of using both the bind and helper method syntax:\n\n```js\n$( \"#my_elem\" ).on( \"mousewheel\", function( event ) {\n    console.log( event.deltaX, event.deltaY, event.deltaFactor );\n} );\n```\n\nThe old behavior of adding three arguments (`delta`, `deltaX`, and `deltaY`) to the\nevent handler is now deprecated and will be removed in later releases.\n\n\n## The Deltas...\n\nThe combination of browsers, operating systems, and devices offer a huge range of possible delta values. In fact if the user\nuses a trackpad and then a physical mouse wheel the delta values can differ wildly. This plugin normalizes those\nvalues so you get a whole number starting at +-1 and going up in increments of +-1 according to the force or\nacceleration that is used. This number has the potential to be in the thousands depending on the device.\n\n### Getting the scroll distance\n\nIn some use-cases we prefer to have the normalized delta but in others we want to know how far the browser should\nscroll based on the users input. This can be done by multiplying the `deltaFactor` by the `deltaX` or `deltaY`\nevent property to find the scroll distance the browser reported.\n\nThe `deltaFactor` property was added to the event object in 3.1.5 so that the actual reported delta value can be\nextracted. This is a non-standard property.\n\n## Building the code in the repo \u0026 running tests\n\n```sh\ngit clone git@github.com:jquery/jquery-mousewheel.git\ncd jquery-mousewheel/\nnpm install\nnpm test\n```\n\nThe unit tests are _very_ basic sanity checks; improvements welcome.\nTo fully test the plugin, load [test/index.html](test/index.html) in each supported\nbrowser and follow the instructions at the top of the file after the unit tests finish.\n","funding_links":[],"categories":["JavaScript","HTML","javascript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjquery%2Fjquery-mousewheel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjquery%2Fjquery-mousewheel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjquery%2Fjquery-mousewheel/lists"}