aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Szopka <bartek.szopka+github@gmail.com>2012-03-08 20:27:37 +0100
committerBartek Szopka <bartek.szopka+github@gmail.com>2012-03-08 20:27:37 +0100
commitefae004bc8f79e8a43d2b749161e14c2c19257fb (patch)
tree2ecc49288e9ab0461bc146306322e7a1cadc484d
parent811e045c60ff32afb4b7f287a4b054cf089b94fe (diff)
parent40acfb1a7299058fbc23ea43d0a81ca2abd9907c (diff)
downloadimpress.js-efae004bc8f79e8a43d2b749161e14c2c19257fb.tar.gz
Merge branch 'master' into scale
-rw-r--r--index.html15
-rw-r--r--js/impress.js4
2 files changed, 14 insertions, 5 deletions
diff --git a/index.html b/index.html
index 3660011..0529155 100644
--- a/index.html
+++ b/index.html
@@ -11,7 +11,7 @@
.-.'`. ; .'`.-.
__ / : ___\ ; /___ ; \ __
,'_ ""--.:__;".-.";: :".-.":__;.--"" _`,
- :' `.t""--.. '<@.`;_ ',@>` ..--""j.' `;
+ :' `.t""--.. '<@.`;_ ',@:` ..--""j.' `;
`:-.._J '-.-'L__ `-- ' L_..-;'
"-.__ ; .-" "-. : __.-"
L ' /.------.\ ' J
@@ -273,6 +273,15 @@
This class is used by this hint below. Check CSS file to see how it's shown with delayed CSS animation.
+ ...
+
+ And when it comes to this piece of JavaScript below ... kids, don't do this at home ;)
+ It's just a quick and dirty workaround to get different content for touch devices.
+ In a real world it should be at least placed in separate JS file ... and the touch content should be
+ probably just hidden somewhere in HTML, not hard-coded in the script.
+
+ Just sayin' ;)
+
-->
<div class="hint">
<p>Use a spacebar or arrow keys to navigate</p>
@@ -294,8 +303,8 @@ if ("ontouchstart" in document.documentElement) {
You also need to call a `impress()` function to initialize impress.js presentation.
And you should do it in the end of your document. Not only because it's a good practice, but also
- because I should be done when the whole document is ready.
- Of course you can wrap it in any kind of "DOM ready" event, but I was to lazy to do so ;)
+ because it should be done when the whole document is ready.
+ Of course you can wrap it in any kind of "DOM ready" event, but I was too lazy to do so ;)
-->
<script src="js/impress.js"></script>
diff --git a/js/impress.js b/js/impress.js
index 68eb2fe..7433dfe 100644
--- a/js/impress.js
+++ b/js/impress.js
@@ -406,7 +406,7 @@
// check if event target (or any of its parents is a link)
var target = event.target;
while ( (target.tagName != "A") &&
- (target != document.body) ) {
+ (target != document.documentElement) ) {
target = target.parentNode;
}
@@ -430,7 +430,7 @@
var target = event.target;
// find closest step element
while ( !target.classList.contains("step") &&
- (target != document.body) ) {
+ (target != document.documentElement) ) {
target = target.parentNode;
}