WheelEvent deltaZ Property
Definition and Usage
The deltaZ property returns a positive value when scrolling, a negative value when scrolling, and 0 otherwise.
Note:Most mouse devices do not have the ability to scroll along the z-axis and always return 0.
Note:This property is read-only.
Example
Return whether the user is scrolling inward or outward (along the z-axis):
function myFunction(event) { var z = event.deltaZ; }
Syntax
event.deltaZ
Technical Details
Return Value: | Double type value indicating the scrolling direction of the mouse wheel. |
---|
Browser Support
Property | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
deltaZ | 31 | Supported | 17 | Not Supported | 18 |
Related Pages
HTML DOM Reference Manual:WheelEvent deltaY Property
HTML DOM Reference Manual:WheelEvent deltaX Property