WheelEvent deltaMode property
Definition and usage
The deltaMode property returns a numeric value representing the length unit of the scroll value (deltaX,deltaY and deltaZThe length unit of (
- 0 = Pixel
- 1 = Line
- 2 = Page
Note:This property is read-only.
Example
Return the length unit of the delta value:
function myFunction(event) { var x = event.deltaMode; // 0 = pixels // 1 = lines // 2 = pages }
Syntax
event.deltaMode
Technical details
Return value: |
Numeric value indicating the length unit of the delta value. Possible values:
|
---|
Browser Support
Properties | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
deltaMode | 31 | Supported | 17 | Not Supported | 18 |
Related Pages
HTML DOM Reference Manual:WheelEvent deltaX Property
HTML DOM Reference Manual:WheelEvent deltaY Property
HTML DOM Reference Manual:WheelEvent deltaZ Property