WheelEvent deltaZ Property
THE WORLD'S LARGEST WEB DEVELOPER SITE

WheelEvent deltaZ Property

❮ DOM Events ❮ WheelEvent

Example

Return whether the user scrolls in or out (along the z-axis):

function myFunction(event) {
  var z = event.deltaZ;
}
Try it Yourself »

Definition and Usage

The deltaZ property returns a positive value when scrolling in, and a negative value when scrolling out, otherwise 0.

Note: Most mouse devices do not have the ability to scroll along the z-axis, and will always return 0.

Note: This property is read-only.


Browser Support

Property
deltaZ 31 yes 17 Not supported 18

Syntax

event.deltaZ

Technical Details

Return Value: A Double, indicating the scrolling direction of the mouse wheel

Related Pages

HTML DOM reference: WheelEvent deltaY Property

HTML DOM reference: WheelEvent deltaX Property


❮ DOM Events ❮ WheelEvent