Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- // mobile & touch
- var touch = {x: 0, y: 0};
- document.addEventListener('touchmove', function(e){
- touch.x = e.clientX || e.pageX;
- touch.y = e.clientY || e.pageY
- }, false);
- // desktop & mouse
- document.addEventListener('mousemove', function(e){
- touch.x = e.clientX || e.pageX;
- touch.y = e.clientY || e.pageY
- }, false);
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement