From 799f23e65cd9d5ac5224c5b51bb30fc091a70865 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 10 Apr 2014 18:47:47 +0200 Subject: [PATCH] Orbit: next_on_click: only for slides Narrow down the selector for the `next_on_click` handler to only match the slides, but not the bullets. --- js/foundation/foundation.orbit.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/foundation/foundation.orbit.js b/js/foundation/foundation.orbit.js index 3197725b1..0acd4701f 100644 --- a/js/foundation/foundation.orbit.js +++ b/js/foundation/foundation.orbit.js @@ -206,6 +206,7 @@ } }; + // Click handler for slides and bullets. self.link_bullet = function(e) { var index = $(this).attr('data-orbit-slide'); if ((typeof index === 'string') && (index = $.trim(index)) != "") { @@ -289,7 +290,7 @@ container.on('click', '.'+settings.prev_class, self.prev); if (settings.next_on_click) { - container.on('click', '[data-orbit-slide]', self.link_bullet); + container.on('click', '.'+settings.slides_container_class+' [data-orbit-slide]', self.link_bullet); } container.on('click', self.toggle_timer); -- 2.47.2