Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

59 lines (47 sloc) 2.07 kB
<!DOCTYPE html>
<title>Lightning Touch Demos</title>
<meta name="viewport" content="width=device-width">
<script async src="LightningTouch.js"></script>
<!--
Function for onclick() handling so it can be compared to Lightning Touch.
Don't actually use swap() in your code!
-->
<script>
function swap(show,hide) {
document.getElementById(hide).setAttribute('style','display:none');
document.getElementById(show).setAttribute('style','display:block');
}
</script>
<style>
body {text-align:center}
div {background-color:#d3d3d3; height:180px; font-size:2em; margin: 0.5em 0 0 0}
h1 {margin:0; font-size:1.5em;}
a {background-color:yellow; display:block; width:100%}
strong {display:block;}
#awesome {background-color: #bada55}
#less-awesome {background-color: #ac1d1c}
.inline {display:inline; background-color:inherit}
</style>
<body data-default-target-id="lightning-main">
<h1>Lightning Touch Demo</h1>
<a class="inline" href="http://github.com/trott/LightningTouch">Go to Project home</a>
<div id="lightning-main">
<strong>Lightning Touch</strong>
<strong>Awesomeness!</strong>
<a href="#" data-target-id="awesome">Tap for Lightning&nbsp;Touch!</a>
</div>
<div id="awesome" style="display:none">
<strong>Whoa!</strong>
<strong>That was fast!</strong>
<a href="#" data-target-id="lightning-main">Tap to try Lightning&nbsp;Touch again!</a>
</div>
<div id="onclick-main">
<strong>Onclick listener</strong>
<strong>For comparison!</strong>
<a href="#" onclick="swap('less-awesome','onclick-main'); return false;">Tap to compare with onclick listener.</a>
</div>
<div id="less-awesome" style="display:none">
<strong>Oooof....</strong>
<strong>That was slow.</strong>
<a href="#" onclick="swap('onclick-main','less-awesome'); return false;">Tap to reset onclick listener.</a>
</div>
Jump to Line
Something went wrong with that request. Please try again.