Skip to content

Instantly share code, notes, and snippets.

@hunk
Created July 20, 2016 21:00
Show Gist options
  • Save hunk/662b5d41831eee153d52a75f29c99fbf to your computer and use it in GitHub Desktop.
Save hunk/662b5d41831eee153d52a75f29c99fbf to your computer and use it in GitHub Desktop.
<html>
<script type="text/javascript">
window.addEventListener('load', function(){
document.body.addEventListener('touchstart', function(e){
var el = document.getElementById("outside");
el.innerHTML = "move in " + e.changedTouches[0].pageX;
}, false);
});
</script>
<style>
#outside { font-size: 80px; }
</style>
<body>
<div>
<p id="outside">
hola
</p>
</div>
</body>
<html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment