aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Szopka <bartek.szopka+github@gmail.com>2012-01-12 11:08:37 -0800
committerBartek Szopka <bartek.szopka+github@gmail.com>2012-01-12 11:08:37 -0800
commit185ba4ea767102669a8d92be637510832c49c33c (patch)
tree4eb5d15dab29fe25a7ea1df0c869267eaa59a15d
parent8b3c38afe2c8ee17ec454e7df9fa560dfa20f2cd (diff)
parentbf8a540e757b7f9d0c839e6d9315964c20fc449f (diff)
downloadimpress.js-185ba4ea767102669a8d92be637510832c49c33c.tar.gz
Merge pull request #54 from Haacked/selectGuard
select method updated to not run if the element is already active
-rw-r--r--js/impress.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/impress.js b/js/impress.js
index 8b626b7..13bec98 100644
--- a/js/impress.js
+++ b/js/impress.js
@@ -187,8 +187,8 @@
var active = null;
var select = function ( el ) {
- if ( !el || !el.stepData ) {
- // selected element is not defined as step
+ if ( !el || !el.stepData || el == active) {
+ // selected element is not defined as step or is already active
return false;
}