From: Paul Date: Fri, 31 Oct 2014 19:16:46 +0000 (-0700) Subject: No Scroll Animation when scroll_speed = 0 X-Git-Tag: v5.5.0~60^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5997%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git 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. --- 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');