A small utility module that allows registration of mouse wheel events through the Mouse Wheel jQuery Plugin.

Usage

To register a mouse wheel event, simply call the mousewheel_add() function. The following would show an alert box whenever you mouse wheel on the box. See admin/help/mousewheel for more examples.

<?php
 
// Create the object.
 
echo '<div id="mousewheel-test" style="width:100px; height:100px; background-color:#333;">' . t('Move your mouse wheel here.') . '</div>';

 
// Create the callback.
 
$mousewheel_test = 'function mousewheel_test(event, delta) {
    alert("Delta: " + delta);
    return false; // Prevent default.
  }'
;
 
drupal_add_js($mousewheel_test, 'inline');

 
// Register the callback.
 
mousewheel_add('#mousewheel-test', 'mousewheel_test');
?>

Downloads

Recommended releases

Version Downloads Date Links
6.x-1.3 tar.gz (9.95 KB) | zip (12.99 KB) 2009-Jun-12 Notes

Development releases

Version Downloads Date Links
6.x-1.x-dev tar.gz (9.84 KB) | zip (12.8 KB) 2011-Feb-25 Notes
5.x-1.x-dev tar.gz (9.92 KB) | zip (12.87 KB) 2011-Feb-25 Notes

Project Information


Maintainers for Mouse Wheel

  • Rob Loach - 12 commits
    last: 2 years ago, first: 4 years ago

Issues for Mouse Wheel

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Statistics (2 years)
New issues
Open bugs
Participants