From 93146771c42e4759ae3fac9e750b0fc85feb12a3 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 31 Oct 2014 12:16:46 -0700 Subject: [PATCH] No Scroll Animation when scroll_speed = 0 While implementing Joyride on our site we noticed when setting scroll_speed to 0 per your documentation, Joyride would still scroll, but do it instantly. This small adjustment fixed the issue for us. --- js/foundation/foundation.joyride.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/foundation/foundation.joyride.js b/js/foundation/foundation.joyride.js index a67505d38..ebb83dbcc 100644 --- a/js/foundation/foundation.joyride.js +++ b/js/foundation/foundation.joyride.js @@ -460,7 +460,7 @@ window_half = $(window).height() / 2; tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight()); - if (tipOffset != 0) { + if (this.settings.scroll_speed !== 0 && tipOffset != 0) { $('html, body').stop().animate({ scrollTop: tipOffset }, this.settings.scroll_speed, 'swing'); -- 2.47.2