slideChange
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
7 changed files
with
31 additions
and
19 deletions
| ... | @@ -26159,6 +26159,7 @@ | ... | @@ -26159,6 +26159,7 @@ |
| 26159 | styleInject(css_248z); | 26159 | styleInject(css_248z); |
| 26160 | 26160 | ||
| 26161 | jQuery(document).ready(function ($) { | 26161 | jQuery(document).ready(function ($) { |
| 26162 | var myLazyLoad = new LazyLoad(); | ||
| 26162 | jQuery('.carousel-items').each(function () { | 26163 | jQuery('.carousel-items').each(function () { |
| 26163 | //var offset = ((window.innerWidth - $('#content').width()) / 2) - 28; | 26164 | //var offset = ((window.innerWidth - $('#content').width()) / 2) - 28; |
| 26164 | //var offsetAfter = ((window.innerWidth - $('#content').width()) / 2) - 28; | 26165 | //var offsetAfter = ((window.innerWidth - $('#content').width()) / 2) - 28; |
| ... | @@ -26202,8 +26203,11 @@ | ... | @@ -26202,8 +26203,11 @@ |
| 26202 | onlyInViewport: false | 26203 | onlyInViewport: false |
| 26203 | } | 26204 | } |
| 26204 | }; | 26205 | }; |
| 26205 | new Swiper(this, swiper_params); | 26206 | var mySwiper = new Swiper(this, swiper_params); |
| 26206 | console.log(swiper_params); | 26207 | mySwiper.on('slideChange', function () { |
| 26208 | console.log('slideChange'); | ||
| 26209 | setTimeout(myLazyLoad.update(), 1500); | ||
| 26210 | }); | ||
| 26207 | }); | 26211 | }); |
| 26208 | $('.carousel ').css('margin-left', "-" + $('#content').css('margin-left')); | 26212 | $('.carousel ').css('margin-left', "-" + $('#content').css('margin-left')); |
| 26209 | $(window).on('resize', function () { | 26213 | $(window).on('resize', function () { |
| ... | @@ -26241,11 +26245,10 @@ | ... | @@ -26241,11 +26245,10 @@ |
| 26241 | $('html, body, #page').animate({ | 26245 | $('html, body, #page').animate({ |
| 26242 | scrollTop: $("#relevant-resources").offset().top - 250 | 26246 | scrollTop: $("#relevant-resources").offset().top - 250 |
| 26243 | }, 100); | 26247 | }, 100); |
| 26244 | setTimeout(myLazyLoad.update(), 2000); | 26248 | setTimeout(myLazyLoad.update(), 1500); |
| 26245 | }); | 26249 | }); |
| 26246 | $(document).on("click", ".page-item, .swiper-button-next, .swiper-button-prev", function (e) { | 26250 | $(document).on("click", ".page-item ", function (e) { |
| 26247 | console.log('page'); | 26251 | setTimeout(myLazyLoad.update(), 1500); |
| 26248 | setTimeout(myLazyLoad.update(), 2000); | ||
| 26249 | }); | 26252 | }); |
| 26250 | }); | 26253 | }); |
| 26251 | document.addEventListener('wpcf7mailsent', function (event) { | 26254 | document.addEventListener('wpcf7mailsent', function (event) { | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -9,10 +9,11 @@ import 'swiper/css/navigation'; | ... | @@ -9,10 +9,11 @@ import 'swiper/css/navigation'; |
| 9 | import 'swiper/css/pagination'; | 9 | import 'swiper/css/pagination'; |
| 10 | import 'swiper/css/keyboard'; | 10 | import 'swiper/css/keyboard'; |
| 11 | import 'swiper/css/a11y'; | 11 | import 'swiper/css/a11y'; |
| 12 | import LazyLoad from "vanilla-lazyload"; | ||
| 12 | 13 | ||
| 13 | jQuery(document).ready(function($) { | 14 | jQuery(document).ready(function($) { |
| 14 | 15 | ||
| 15 | 16 | var myLazyLoad = new LazyLoad(); | |
| 16 | 17 | ||
| 17 | jQuery('.carousel-items').each(function() { | 18 | jQuery('.carousel-items').each(function() { |
| 18 | 19 | ||
| ... | @@ -70,8 +71,12 @@ jQuery(document).ready(function($) { | ... | @@ -70,8 +71,12 @@ jQuery(document).ready(function($) { |
| 70 | }; | 71 | }; |
| 71 | 72 | ||
| 72 | 73 | ||
| 73 | new Swiper(this, swiper_params); | 74 | var mySwiper = new Swiper(this, swiper_params); |
| 74 | console.log(swiper_params); | 75 | |
| 76 | mySwiper.on('slideChange', function () { | ||
| 77 | console.log('slideChange'); | ||
| 78 | setTimeout( myLazyLoad.update(), 1500); | ||
| 79 | }); | ||
| 75 | 80 | ||
| 76 | }); | 81 | }); |
| 77 | $('.carousel ').css('margin-left',"-"+$('#content').css('margin-left')); | 82 | $('.carousel ').css('margin-left',"-"+$('#content').css('margin-left')); | ... | ... |
| ... | @@ -3,6 +3,9 @@ import jquery from 'jquery'; | ... | @@ -3,6 +3,9 @@ import jquery from 'jquery'; |
| 3 | import LazyLoad from "vanilla-lazyload"; | 3 | import LazyLoad from "vanilla-lazyload"; |
| 4 | import DataTable from 'datatables.net-dt'; | 4 | import DataTable from 'datatables.net-dt'; |
| 5 | 5 | ||
| 6 | |||
| 7 | |||
| 8 | |||
| 6 | import "./_menu_mobile"; | 9 | import "./_menu_mobile"; |
| 7 | import "./_search"; | 10 | import "./_search"; |
| 8 | import "./_header_menu"; | 11 | import "./_header_menu"; |
| ... | @@ -12,9 +15,9 @@ import "./_carousels"; | ... | @@ -12,9 +15,9 @@ import "./_carousels"; |
| 12 | 15 | ||
| 13 | 16 | ||
| 14 | 17 | ||
| 15 | var myLazyLoad = new LazyLoad(); | ||
| 16 | 18 | ||
| 17 | 19 | ||
| 20 | var myLazyLoad = new LazyLoad(); | ||
| 18 | 21 | ||
| 19 | window.tz_checkVisible = function(elm, evalType , offset, heightBuffer) { | 22 | window.tz_checkVisible = function(elm, evalType , offset, heightBuffer) { |
| 20 | evalType = evalType || "visible"; | 23 | evalType = evalType || "visible"; |
| ... | @@ -46,18 +49,20 @@ jQuery(document).ready(function($) { | ... | @@ -46,18 +49,20 @@ jQuery(document).ready(function($) { |
| 46 | 49 | ||
| 47 | 50 | ||
| 48 | $('#relevant-resources').on( 'page.dt', function () { | 51 | $('#relevant-resources').on( 'page.dt', function () { |
| 49 | |||
| 50 | $('html, body, #page').animate({ | 52 | $('html, body, #page').animate({ |
| 51 | scrollTop: $("#relevant-resources").offset().top - 250 | 53 | scrollTop: $("#relevant-resources").offset().top - 250 |
| 52 | }, 100); | 54 | }, 100); |
| 53 | setTimeout( myLazyLoad.update(), 2000); | 55 | setTimeout( myLazyLoad.update(), 1500); |
| 54 | }); | 56 | }); |
| 55 | 57 | ||
| 56 | $(document).on("click", ".page-item, .swiper-button-next, .swiper-button-prev", function(e){ | 58 | |
| 57 | console.log('page'); | 59 | $(document).on("click", ".page-item ", function(e){ |
| 58 | setTimeout( myLazyLoad.update(), 2000); | 60 | setTimeout( myLazyLoad.update(), 1500); |
| 59 | }); | 61 | }); |
| 60 | } ); | 62 | |
| 63 | |||
| 64 | |||
| 65 | }); | ||
| 61 | 66 | ||
| 62 | 67 | ||
| 63 | 68 | ||
| ... | @@ -69,7 +74,6 @@ document.addEventListener( 'wpcf7mailsent', function( event ) { | ... | @@ -69,7 +74,6 @@ document.addEventListener( 'wpcf7mailsent', function( event ) { |
| 69 | jQuery(document).ready(function($) { | 74 | jQuery(document).ready(function($) { |
| 70 | $(document).on("click", ".pojo-a11y-toolbar-link", function(e){ | 75 | $(document).on("click", ".pojo-a11y-toolbar-link", function(e){ |
| 71 | console.log('click'); | 76 | console.log('click'); |
| 72 | |||
| 73 | $('.gt_options').hasClass('gt-open') ? $('.gt_options').removeClass('gt-open') : $('.gt_options').addClass('gt-open'); | 77 | $('.gt_options').hasClass('gt-open') ? $('.gt_options').removeClass('gt-open') : $('.gt_options').addClass('gt-open'); |
| 74 | }); | 78 | }); |
| 75 | 79 | ... | ... |
-
Please register or sign in to post a comment