diff --git a/src/js/_components/_ui.multislider.js b/src/js/_components/_ui.multislider.js index e166fe5..4bae1ca 100755 --- a/src/js/_components/_ui.multislider.js +++ b/src/js/_components/_ui.multislider.js @@ -213,7 +213,7 @@ const MultiSlider = (($) => { }; // auto-apply - $(W).on(`${Events.AJAX} ${Events.LOADED}`, () => { + $(W).on(Events.LODEDANDREADY, () => { console.log(`Initializing: ${NAME}`); $(`.${NAME}`).jsMultiSlider(); diff --git a/src/js/_main.js b/src/js/_main.js index 2e92ebd..e17508f 100755 --- a/src/js/_main.js +++ b/src/js/_main.js @@ -15,7 +15,7 @@ import FormBasics from './_components/_ui.form.basics'; import SmoothScroll from 'smooth-scroll'; const smoothScroll = SmoothScroll(); -const MainUI = (($) => { +const MainUI = ($ => { // Constants const W = window; const D = document; @@ -174,7 +174,7 @@ const MainUI = (($) => { // // scroll links - $('.js-scrollTo').on('click', (e) => { + $('.js-scrollTo').on('click', e => { e.preventDefault(); const el = e.currentTarget; const $el = $(e.currentTarget); @@ -203,7 +203,7 @@ const MainUI = (($) => { } // data-set links - $('[data-set-target]').on('click', (e) => { + $('[data-set-target]').on('click', e => { const $el = $(e.currentTarget); const $target = $($el.data('set-target')); @@ -227,7 +227,7 @@ const MainUI = (($) => { }); // emulate links - $('.a[data-href]').on('click', (e) => { + $('.a[data-href]').on('click', e => { const $el = $(e.currentTarget); const href = $el.data('href'); if (!href.length) { @@ -382,7 +382,9 @@ const MainUI = (($) => { AjaxUI.preload($imgLazyUrls).then(() => { console.log('All images are loaded!'); - $(W).trigger(`${Events.LAZYIMAGESREADY}`); + setTimeout(() => { + $(W).trigger(`${Events.LAZYIMAGESREADY}`); + }, 100); }); }); } diff --git a/src/scss/_components/_ui.multislider.scss b/src/scss/_components/_ui.multislider.scss index 8801c1b..42fb8ab 100755 --- a/src/scss/_components/_ui.multislider.scss +++ b/src/scss/_components/_ui.multislider.scss @@ -2,6 +2,8 @@ $grid-gutter-element-height: 2rem !default; .jsMultiSlider { + position: relative; + display: flex; margin-bottom: $grid-gutter-element-height/2; &-active {