]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Orbit: next_on_click: only for slides 4949/head
authorDaniel Hahler <git@thequod.de>
Thu, 10 Apr 2014 16:47:47 +0000 (18:47 +0200)
committerDaniel Hahler <git@thequod.de>
Thu, 10 Apr 2014 16:47:47 +0000 (18:47 +0200)
Narrow down the selector for the `next_on_click` handler to only match
the slides, but not the bullets.

js/foundation/foundation.orbit.js

index 3197725b1a4d12dcfd565fa830c3357f8e3c1881..0acd4701fc4b28694c18c2eaedc835c9de04fa06 100644 (file)
       }
     };
 
+    // 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)) != "") {
       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);