Updated the footable Lib.

This commit is contained in:
2016-03-19 03:51:35 +02:00
parent 1cad434a39
commit 3bc71a935c
801 changed files with 8543 additions and 3032 deletions

View File

@@ -1,4 +1,4 @@
/*! UIkit 2.21.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
/*! UIkit 2.25.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
(function(UI) {
"use strict";
@@ -19,13 +19,15 @@
bar = element.find(".uk-offcanvas-bar:first"),
rtl = (UI.langdirection == "right"),
flip = bar.hasClass("uk-offcanvas-bar-flip") ? -1:1,
dir = flip * (rtl ? -1 : 1);
dir = flip * (rtl ? -1 : 1),
scrollbarwidth = window.innerWidth - $body.width();
scrollpos = {x: window.pageXOffset, y: window.pageYOffset};
element.addClass("uk-active");
$body.css({"width": window.innerWidth, "height": window.innerHeight}).addClass("uk-offcanvas-page");
$body.css({"width": window.innerWidth - scrollbarwidth, "height": window.innerHeight}).addClass("uk-offcanvas-page");
$body.css((rtl ? "margin-right" : "margin-left"), (rtl ? -1 : 1) * (bar.outerWidth() * dir)).width(); // .width() - force redraw
$html.css('margin-top', scrollpos.y * -1);
@@ -96,7 +98,7 @@
Offcanvas.hide();
});
element.on("click", "a[href^='#']", function(e){
element.on("click", "a[href*='#']", function(e){
var link = UI.$(this),
href = link.attr("href");
@@ -110,16 +112,16 @@
var target;
try {
target = UI.$(href);
target = UI.$(link[0].hash);
} catch (e){
target = ""
target = '';
}
if (!target.length) {
target = UI.$('[name="'+href.replace('#','')+'"]');
target = UI.$('[name="'+link[0].hash.replace('#','')+'"]');
}
if (target.length && link.attr('data-uk-smooth-scroll') && UI.Utils.scrollToElement) {
if (target.length && UI.Utils.scrollToElement) {
UI.Utils.scrollToElement(target, UI.Utils.options(link.attr('data-uk-smooth-scroll') || '{}'));
} else {
window.location.href = href;