diff options
author | Bartek Szopka <bartek.szopka+github@gmail.com> | 2012-01-12 21:31:18 +0100 |
---|---|---|
committer | Bartek Szopka <bartek.szopka+github@gmail.com> | 2012-01-12 21:31:18 +0100 |
commit | 8cd464a92660b311d9d40894f0b43b2ef191e0a1 (patch) | |
tree | 87b98703166dc0607a3d905eb8d6fe18aaa798dd | |
parent | c5b11276504422322a8da5f8a328a62461e73d19 (diff) | |
download | impress.js-8cd464a92660b311d9d40894f0b43b2ef191e0a1.tar.gz |
yeah, that's what happens when you do quick fixes using timeouts...
-rw-r--r-- | js/impress.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/js/impress.js b/js/impress.js index c3d8e5a..913504c 100644 --- a/js/impress.js +++ b/js/impress.js @@ -185,6 +185,7 @@ // making given step active var active = null; + var hashTimeout = null; var select = function ( el ) { if ( !el || !el.stepData || el == active) { @@ -216,7 +217,8 @@ // // and it has to be set after animation finishes, because in chrome it // causes transtion being laggy - window.setTimeout(function () { + window.clearTimeout( hashTimeout ); + hashTimeout = window.setTimeout(function () { window.location.hash = "#/" + el.id; }, 1000); |