wheel

  • Revision slug: Mozilla_event_reference/wheel
  • Revision title: wheel
  • Revision id: 239618
  • Created:
  • Creator: louisremi
  • Is current revision? No
  • Comment

Revision Content

The wheel event is fired when a wheel button of a pointing device (usually a mouse) is rotated.

General info

Specification
DOM L3
Interface
MouseEvent
Synchronicity
synchronous
Bubbles
Yes
Cancelable
Yes
Target
defaultView, Document, Element
Default Action
Scroll (or zoom) the document.

Properties

{{OpenEventProperties()}}{{MouseEventProperties()}}{{WheelEventProperties()}}{{CloseEventProperties()}}

Alternatives

The DOMMouseScroll and MozMousePixelScroll events can be used as an alternative to the wheel event in earlier versions of Firefox. The mousewheel event can be used to determine in which direction the wheel was rotated, in earlier version of other browsers (IE in particular).

Revision Source

<p>The <code>wheel</code> event is fired when a wheel button of a pointing device (usually a mouse) is rotated.</p>
<h2 id="General_info">General info</h2>
<dl>
  <dt style="float: left; text-align: right; width: 120px;">
    Specification</dt>
  <dd style="margin: 0 0 0 120px;">
    <a class="external" href="http://www.w3.org/TR/DOM-Level-3-Events/#event-type-wheel">DOM L3</a></dd>
  <dt style="float: left; text-align: right; width: 120px;">
    Interface</dt>
  <dd style="margin: 0 0 0 120px;">
    MouseEvent</dd>
  <dt style="float: left; text-align: right; width: 120px;">
    Synchronicity</dt>
  <dd style="margin: 0 0 0 120px;">
    synchronous</dd>
  <dt style="float: left; text-align: right; width: 120px;">
    Bubbles</dt>
  <dd style="margin: 0 0 0 120px;">
    Yes</dd>
  <dt style="float: left; text-align: right; width: 120px;">
    Cancelable</dt>
  <dd style="margin: 0 0 0 120px;">
    Yes</dd>
  <dt style="float: left; text-align: right; width: 120px;">
    Target</dt>
  <dd style="margin: 0 0 0 120px;">
    defaultView, Document, Element</dd>
  <dt style="float: left; text-align: right; width: 120px;">
    Default Action</dt>
  <dd style="margin: 0 0 0 120px;">
    Scroll (or zoom) the document.</dd>
</dl>
<h2 id="Properties">Properties</h2>
<p>{{OpenEventProperties()}}{{MouseEventProperties()}}{{WheelEventProperties()}}{{CloseEventProperties()}}</p>
<h2 id="Alternatives">Alternatives</h2>
<p>The <a href="https://developer.mozilla.org/en/Gecko-Specific_DOM_Events#DOMMouseScroll" title="https://developer.mozilla.org/en/Gecko-Specific_DOM_Events#DOMMouseScroll"><code>DOMMouseScroll</code></a> and <a href="https://developer.mozilla.org/en/Gecko-Specific_DOM_Events#MozMousePixelScroll" title="https://developer.mozilla.org/en/Gecko-Specific_DOM_Events#MozMousePixelScroll"><code>MozMousePixelScroll</code></a> events can be used as an alternative to the <code>wheel</code> event in earlier versions of Firefox. The <code>mousewheel </code>event can be used to determine in which direction the wheel was rotated, in earlier version of other browsers (IE in particular).</p>
Revert to this revision