]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Settings duration and easing for magellan 6057/head
authorThiago Silva Ferreira <thiagosfsjc@gmail.com>
Sun, 23 Nov 2014 21:09:45 +0000 (19:09 -0200)
committerThiago Silva Ferreira <thiagosfsjc@gmail.com>
Sun, 23 Nov 2014 21:09:45 +0000 (19:09 -0200)
js/foundation/foundation.magellan.js

index f6687583a1a95da8f70d4a84bf60c6edf449781f..4bde19ea7e748f693a8df391e2e0c0ec67430489 100644 (file)
@@ -12,7 +12,9 @@
       destination_threshold: 20, // pixels from the top of destination for it to be considered active
       throttle_delay: 30, // calculation throttling to increase framerate
       fixed_top: 0, // top distance in pixels assigend to the fixed element on scroll
-      offset_by_height: true // whether to offset the destination by the expedition height. Usually you want this to be true, unless your expedition is on the side.
+      offset_by_height: true,  // whether to offset the destination by the expedition height. Usually you want this to be true, unless your expedition is on the side.
+      duration: 700, // animation duration time 
+      easing: 'swing' // animation easing
     },
 
     init : function (scope, method, options) {
@@ -51,7 +53,7 @@
 
           $('html, body').stop().animate({
             'scrollTop': scroll_top
-          }, 700, 'swing', function () {
+          }, settings.duration, settings.easing, function () {
             if(history.pushState) {
               history.pushState(null, null, '#'+hash);
             }