]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
adds Math.round call to avoid decimal scrolling locations
authorChris Oyler <christopher.oyler@gmail.com>
Mon, 25 Jan 2016 18:38:11 +0000 (10:38 -0800)
committerChris Oyler <christopher.oyler@gmail.com>
Mon, 25 Jan 2016 18:38:11 +0000 (10:38 -0800)
js/foundation.magellan.js

index 6db58c3749cfb546633629162003301f709caa11..3ff5fd50173924747306c87d443f046154c795cd 100644 (file)
    * @function
    */
   Magellan.prototype.scrollToLoc = function(loc){
-    var scrollPos = $(loc).offset().top - this.options.threshold / 2 - this.options.barOffset;
+    var scrollPos = Math.round($(loc).offset().top - this.options.threshold / 2 - this.options.barOffset);
 
     $('html, body').stop(true).animate({
         scrollTop: scrollPos