summaryrefslogtreecommitdiff
path: root/js/core/smooth-scroll.min.js
diff options
context:
space:
mode:
authorPascal Szewczyk <ps@elektrowecker.de>2016-07-18 23:23:54 +0200
committerPascal Szewczyk <ps@elektrowecker.de>2016-07-18 23:23:54 +0200
commitc94fb32c7a3c28b18a27460aa2447eeec1fac1de (patch)
treee3bb35d57f90256698135c722eadeb784b47992c /js/core/smooth-scroll.min.js
parent89685742de42cb8e54ebdbaf7a207cfe16fa62b8 (diff)
uikit added
Diffstat (limited to 'js/core/smooth-scroll.min.js')
-rwxr-xr-xjs/core/smooth-scroll.min.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/js/core/smooth-scroll.min.js b/js/core/smooth-scroll.min.js
new file mode 100755
index 0000000..5968d4e
--- /dev/null
+++ b/js/core/smooth-scroll.min.js
@@ -0,0 +1,2 @@
1/*! UIkit 2.26.4 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2!function(t){"use strict";function o(o,i){i=t.$.extend({duration:1e3,transition:"easeOutExpo",offset:0,complete:function(){}},i);var n=o.offset().top-i.offset,s=t.$doc.height(),e=window.innerHeight;n+e>s&&(n=s-e),t.$("html,body").stop().animate({scrollTop:n},i.duration,i.transition).promise().done(i.complete)}t.component("smoothScroll",{boot:function(){t.$html.on("click.smooth-scroll.uikit","[data-uk-smooth-scroll]",function(){var o=t.$(this);if(!o.data("smoothScroll")){{t.smoothScroll(o,t.Utils.options(o.attr("data-uk-smooth-scroll")))}o.trigger("click")}return!1})},init:function(){var i=this;this.on("click",function(n){n.preventDefault(),o(t.$(this.hash).length?t.$(this.hash):t.$("body"),i.options)})}}),t.Utils.scrollToElement=o,t.$.easing.easeOutExpo||(t.$.easing.easeOutExpo=function(t,o,i,n,s){return o==s?i+n:n*(-Math.pow(2,-10*o/s)+1)+i})}(UIkit); \ No newline at end of file