Skip to content


Subversion checkout URL

You can clone with
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!
function swap(show,hide) {
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}
<body data-default-target-id="lightning-main">
<h1>Lightning Touch Demo</h1>
<a class="inline" href="">Go to Project home</a>
<div id="lightning-main">
<strong>Lightning Touch</strong>
<a href="#" data-target-id="awesome">Tap for Lightning&nbsp;Touch!</a>
<div id="awesome" style="display:none">
<strong>That was fast!</strong>
<a href="#" data-target-id="lightning-main">Tap to try Lightning&nbsp;Touch again!</a>
<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 id="less-awesome" style="display:none">
<strong>That was slow.</strong>
<a href="#" onclick="swap('onclick-main','less-awesome'); return false;">Tap to reset onclick listener.</a>
Jump to Line
Something went wrong with that request. Please try again.