From 9c5448a0a62a347e4b80f78f23dca61562fd2ac9 Mon Sep 17 00:00:00 2001 From: Joel Salisbury Date: Thu, 21 Jan 2016 14:34:15 -0500 Subject: [PATCH] Testing --- index.html | 11 ++++++----- js/main.js | 13 +++++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index b22fb35..87dfde2 100644 --- a/index.html +++ b/index.html @@ -15,12 +15,13 @@ - + +

- -

Hello world! This is HTML5 Boilerplate.

+ +

+ + diff --git a/js/main.js b/js/main.js index e69de29..bfb4aa6 100644 --- a/js/main.js +++ b/js/main.js @@ -0,0 +1,13 @@ +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); + +} \ No newline at end of file