Skip to content
Permalink
9c5448a0a6
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
13 lines (10 sloc) 359 Bytes
if (window.DeviceMotionEvent) {
window.addEventListener('devicemotion', deviceMotionHandler, false);
} else {
document.getElementById("warning").innerHTML = "Not supported."
}
function deviceMotionHandler(eventData) {
// Grab the acceleration from the results
var acceleration = eventData.acceleration;
$("#accelerationX").html(acceleration.x);
}