From: Glenn Korban Date: Wed, 26 Feb 2014 23:58:58 +0000 (-0800) Subject: Add 'next_on_click' setting for Orbit (#4387) X-Git-Tag: v5.2.1~5^2~12^2~23^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F4553%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Add 'next_on_click' setting for Orbit (#4387) --- diff --git a/doc/pages/components/orbit.html b/doc/pages/components/orbit.html index ee83b7a4f..e5b664a73 100644 --- a/doc/pages/components/orbit.html +++ b/doc/pages/components/orbit.html @@ -172,6 +172,7 @@ $(document).foundation({ timer_speed: 10000, // Sets the amount of time in milliseconds before transitioning a slide pause_on_hover: true, // Pauses on the current slide while hovering resume_on_mouseout: false, // If pause on hover is set to true, this setting resumes playback after mousing out of slide + next_on_click: true, // Advance to next slide on click animation_speed: 500, // Sets the amount of time in milliseconds the transition between slides will last stack_on_small: false, navigation_arrows: true, diff --git a/js/foundation/foundation.orbit.js b/js/foundation/foundation.orbit.js index dcfa7c147..f11f301f2 100644 --- a/js/foundation/foundation.orbit.js +++ b/js/foundation/foundation.orbit.js @@ -229,7 +229,8 @@ animate = new SlideAnimation(settings, slides_container); container.on('click', '.'+settings.next_class, self.next); container.on('click', '.'+settings.prev_class, self.prev); - container.on('click', '[data-orbit-slide]', self.link_bullet); + if (settings.next_on_click) + container.on('click', '[data-orbit-slide]', self.link_bullet); container.on('click', self.toggle_timer); if (settings.swipe) { container.on('touchstart.fndtn.orbit', function(e) { @@ -403,6 +404,7 @@ timer_speed: 10000, pause_on_hover: true, resume_on_mouseout: false, + next_on_click: true, animation_speed: 500, stack_on_small: false, navigation_arrows: true,