1(function($) { 2 3 $.fn.updateClientsGrid = function() { 4 function initClientsGrid() { 5 if (window.tgpLazyItems !== undefined) { 6 var isShowed = window.tgpLazyItems.checkGroupShowed(this, function(node) { 7 initClientsGrid.call(node); 8 }); 9 if (!isShowed) { 10 return; 11 } 12 } 13 14 var $clientsCarouselElement = $(this); 15 16 var $clientsItemsCarousel = $('.gem-clients-grid-carousel', $clientsCarouselElement); 17 var $clientsItemsPagination = $('.gem-mini-pagination', $clientsCarouselElement); 18 19 var autoscroll = $clientsCarouselElement.data('autoscroll') > 0 ? $clientsCarouselElement.data('autoscroll') : false; 20 21 $clientsCarouselElement.thegemPreloader(function() { 22 23 var $clientsGridCarousel = $clientsItemsCarousel.carouFredSel({ 24 auto: autoscroll, 25 circular: false, 26 infinite: true, 27 width: '100%', 28 items: 1, 29 responsive: true, 30 height: 'auto', 31 align: 'center', 32 pagination: $clientsItemsPagination, 33 scroll: { 34 pauseOnHover: true 35 } 36 }); 37 38 }); 39 } 40 41 $('.gem-clients-type-carousel-grid:not(.carousel-disabled)', this).each(initClientsGrid); 42 } 43 44 $.fn.updateClientsCarousel = function() { 45 function initClientsCarousel() { 46 if (window.tgpLazyItems !== undefined) { 47 var isShowed = window.tgpLazyItems.checkGroupShowed(this, function(node) {
48 initClientsCarousel.call(node); 49 }); 50 if (!isShowed) { 51 return; 52 } 53 } 54 55 var $clientsElement = $(this); 56 57 var $clientsCarousel = $('.gem-client-carousel', $clientsElement); 58 var $clientsPrev = $('.gem-client-prev', $clientsElement); 59 var $clientsNext = $('.gem-client-next', $clientsElement); 60 61 var autoscroll = $clientsElement.data('autoscroll') > 0 ? $clientsElement.data('autoscroll') : false; 62 63 $clientsElement.thegemPreloader(function() { 64 65 var $clientsView = $clientsCarousel.carouFredSel({ 66 auto: autoscroll, 67 circular: true, 68 infinite: false, 69 scroll: { 70 items: 1 71 }, 72 width: '100%', 73 responsive: false, 74 height: 'auto', 75 align: 'center', 76 prev: $clientsPrev, 77 next: $clientsNext 78 }); 79 80 }); 81 } 82 83 $('.gem_client_carousel-items:not(.carousel-disabled)', this).each(initClientsCarousel); 84 } 85 86 $(function() { 87 88 $('.gem-clients-type-carousel-grid:not(.carousel-disabled)').each(function() { 89 90 var $clientsCarouselElement = $(this); 91 92 var $clientsItems = $('.gem-clients-slide', $clientsCarouselElement); 93 94 var $clientsItemsWrap = $('<div class="gem-clients-grid-carousel-wrap"/>') 95 .appendTo($clientsCarouselElement); 96 var $clientsItemsCarousel = $('<div class="gem-clients-grid-carousel"/>') 97 .appendTo($clientsItemsWrap); 98 var $clientsItemsPagination = $('<div class="gem-clients-grid-pagination gem-mini-pagination"/>') 99 .appendTo($clientsItemsWrap); 100 $clientsItems.appendTo($clientsItemsCarousel); 101 102 }); 103 104 105 $('.gem_client_carousel-items').each(function () { 106 107 var $clientsElement = $(this); 108 109 var $clients = $('.gem-client-item', $clientsElement); 110 111 var $clientsWrap = $('<div class="gem-client-carousel-item-wrap"/>') 112 .appendTo($clientsElement); 113 var $clientsCarousel = $('<div class="gem-client-carousel"/>') 114 .appendTo($clientsWrap); 115 var $clientsNavigation = $('<div class="gem-client-carousel-navigation"/>') 116 .appendTo($clientsWrap); 117 var $clientsPrev = $('<a href="#" class="gem-prev gem-client-prev"/></a>') 118 .appendTo($clientsNavigation); 119 var $clientsNext = $('<a href="#" class="gem-next gem-client-next"/></a>') 120 .appendTo($clientsNavigation); 121 $clients.appendTo($clientsCarousel); 122 123 }); 124 125 $('body').updateClientsGrid(); 126 $('body').updateClientsCarousel(); 127 $('.fullwidth-block').each(function() { 128 $(this).on('updateClientsCarousel', function() { 129 $(this).updateClientsCarousel(); 130 }); 131 }); 132 $('.gem_tab').on('tab-update', function() { 133 $(this).updateClientsGrid(); 134 }); 135 $(document).on('gem.show.vc.tabs', '[data-vc-accordion]', function() { 136 $(this).data('vc.accordion').getTarget().updateClientsGrid(); 137 }); 138 $(document).on('gem.show.vc.accordion', '[data-vc-accordion]', function() { 139 $(this).data('vc.accordion').getTarget().updateClientsGrid(); 140 }); 141 142 }); 143 144})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.