From 66725af0f80fd8fbff29d553c6f20054409ab0c0 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 27 Aug 2016 12:08:53 +0200 Subject: fix js library loading --- layouts/shortcodes/map.html | 100 ++++++++++++++++++++---------- themes/flog/layouts/partials/footer.html | 13 +++- themes/flog/layouts/partials/listing.html | 26 +++++++- 3 files changed, 100 insertions(+), 39 deletions(-) diff --git a/layouts/shortcodes/map.html b/layouts/shortcodes/map.html index 833e084..17eab91 100644 --- a/layouts/shortcodes/map.html +++ b/layouts/shortcodes/map.html @@ -1,53 +1,85 @@
diff --git a/themes/flog/layouts/partials/footer.html b/themes/flog/layouts/partials/footer.html index a617ce6..937ff18 100644 --- a/themes/flog/layouts/partials/footer.html +++ b/themes/flog/layouts/partials/footer.html @@ -9,15 +9,22 @@ var coords = '50% ' + yPos + 'px'; $('body').css({ backgroundPosition: coords }); }; - function ready() { + + document.addEventListener('pageReady', function() { parallax(); $('.button-collapse').sideNav(); $('.button-collapse').sideNav('hide'); - }; + }); + + function ready() { + document.dispatchEvent(new CustomEvent('pageReady')); + } + $(document).ready(function() { + parallax(); $(window).scroll(parallax); + $('.button-collapse').sideNav(); $('#main').smoothState({ prefetch: true, onAfter: ready }); - ready(); }); diff --git a/themes/flog/layouts/partials/listing.html b/themes/flog/layouts/partials/listing.html index 31e5614..93fe09d 100644 --- a/themes/flog/layouts/partials/listing.html +++ b/themes/flog/layouts/partials/listing.html @@ -28,7 +28,29 @@ {{ end }} - -- cgit v1.3.1