Skip to content
Browse files

Cleanup

  • Loading branch information...
1 parent fe8977b commit 5330f0c347418e5eab729ab70118daad262a9053 @brian-c committed
Showing with 1 addition and 87 deletions.
  1. +0 −87 demo.html
  2. +1 −0 test/index.html
View
87 demo.html
@@ -1,87 +0,0 @@
-<!DOCTYPE html>
-
-<html>
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, user-scalable=no" />
- <title>Phantom Limb demo page</title>
-
- <style type="text/css">
- html {
- font: 14px 'Helvetica Neue', sans-serif;
- }
-
- hr {
- border: 1px solid #ccc;
- border-width: 4px 0 0 0;
- }
-
- .touch {
- background: #cdf;
- display: inline-block;
- border: 1px solid #789;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- margin: 0.25em 1em 0 0;
- padding: 1em 0;
- text-align: center;
- width: 11em;
- }
- </style>
-
- <script src="phantom-limb.js" type="text/javascript"></script>
- <link href="phantom-limb.css" rel="stylesheet" type="text/css" />
- </head>
-
- <body>
- <h1>Phantom Limb</h1>
- <p>Brian Carstensen &lt;<a href="mailto:brian.carstensen@gmail.com">brian.carstensen@gmail.com</a>&gt;</p>
-
- <hr />
-
- <p>Phantom Limb simulates basic touch events in desktop browsers, allowing you to utilize the debugging goodness of the WebKit Inspector and Firebug while developing a mobile web app. Official site at <a href="http://viewinglens.com/phantom-limb">http://viewinglens.com/phantom-limb</a>.</p>
- <p>View source to see how to initialize Phantom Limb. <a href="https://github.com/brian-c/phantom-limb">Source is on GitHub</a>.</p>
-
- <hr />
-
- <h2>Demo</h2>
- <p>Each of these boxes will <strong>log something to the console when touched</strong>, so keep on eye on it. Hold <kbd>alt</kbd> to engage a second finger. Hold <kbd>shift</kbd> to lock its position relative to the first's.</p>
-
- <script type="text/javascript">
- // Here's the function that'll run
- var doSomeLogging = function() {
- console.info('Touched!', this, arguments);
- };
- </script>
-
- <p>These have event handlers added with listeners (<code>node.addEventListener('touchstart', ...)</code>):<br />
- <span id="addedStart" class="touch">touchstart (added)</span>
- <span id="addedMove" class="touch">touchmove (added)</span>
- <span id="addedEnd" class="touch">touchend (added)</span>
- </p>
-
- <script type="text/javascript">
- document.getElementById('addedStart').addEventListener('touchstart', doSomeLogging, false);
- document.getElementById('addedMove').addEventListener('touchmove', doSomeLogging, false);
- document.getElementById('addedEnd').addEventListener('touchend', doSomeLogging, false);
- </script>
-
- <p>These have event handlers added as propeties (<code>node.ontouchstart = ...</code>):<br />
- <span id="proppedStart" class="touch">touchstart (propped)</span>
- <span id="proppedMove" class="touch">touchmove (propped)</span>
- <span id="proppedEnd" class="touch">touchend (propped)</span>
- </p>
-
- <script type="text/javascript">
- document.getElementById('proppedStart').ontouchstart = doSomeLogging;
- document.getElementById('proppedMove').ontouchmove = doSomeLogging;
- document.getElementById('proppedEnd').ontouchend = doSomeLogging;
- </script>
-
- <p>These have event handlers added inline (<code>&lt;node ontouchstart="..."</code>):<br />
- <span id="inlineStart" class="touch" ontouchstart="doSomeLogging.apply(this, arguments);">ontouchstart (inline)</span>
- <span id="inlineMove" class="touch" ontouchmove="doSomeLogging.apply(this, arguments);">ontouchmove (inline)</span>
- <span id="inlineEnd" class="touch" ontouchend="doSomeLogging.apply(this, arguments);">ontouchend (inline)</span>
- </p>
- </body>
-</html>
View
1 test/index.html
@@ -25,6 +25,7 @@
box-sizing: border-box;
float: left;
height: 75%;
+ padding: 10px;
vertical-align: middle;
width: 50%;
}

0 comments on commit 5330f0c

Please sign in to comment.
Something went wrong with that request. Please try again.