My favorites | Sign in
Project Logo
                
Search
for
Updated Nov 24, 2008 by haineault
MouseWheel  

jquery.mousewheel.js

Author Copyright (c) 2007 Brandon Aaron (brandonaaron.net)
License Dual licensed under the MIT and GPL licenses
Website http://plugins.jquery.com/project/mousewheel

Introduction

Adds mouse wheel support for your application! Just call mousewheel to add the event and call unmousewheel to remove the event.

Basic usage

var callback = function(e, delta) {
    console.log(e.pageX, e.pageY, delta);

    // optionally you can prevent default behavior
    e.stopPropagation();
    e.preventDefault();
};

$('#test').mousewheel(callback);

Removing handler

$('#test').unmousewheel(callback);

Sign in to add a comment
Hosted by Google Code