From: Daniel Hahler Date: Thu, 10 Apr 2014 16:47:47 +0000 (+0200) Subject: Orbit: next_on_click: only for slides X-Git-Tag: v5.2.3~62^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F4949%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git 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. --- 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);