1;(function($) { 2 3 "use strict"; 4 5 var blogPostsOwl = function() { 6 if ( $().owlCarousel ) { 7 $('.tf-posts-wrap.has-carousel').each(function(){ 8 var 9 $this = $(this), 10 item = $this.data("column"), 11 item2 = $this.data("column2"), 12 item3 = $this.data("column3"), 13 spacer = Number($this.data("spacer")), 14 prev_icon = $this.data("prev_icon"), 15 next_icon = $this.data("next_icon"); 16 17 var loop = false; 18 if ($this.data("loop") == 'yes') { 19 loop = true; 20 } 21 22 var arrow = false; 23 if ($this.data("arrow") == 'yes') { 24 arrow = true; 25 } 26 27 var auto = false; 28 if ($this.data("auto") == 'yes') { 29 auto = true; 30 } 31 32 $this.find('.owl-carousel').owlCarousel({ 33 loop: loop, 34 margin: spacer, 35 nav: true, 36 pagination: false, 37 autoplay: auto, 38 autoplayTimeout: 5000, 39 autoplayHoverPause: true, 40 animateIn: 'fadeIn', 41 animateOut: 'fadeOut', 42 navText: [$('.tf-prev'),$('.tf-next'),], 43 responsive: { 44 0:{ 45 items:item3 46 }, 47 768:{ 48 items:item2 49 }, 50 1000:{ 51 items:item 52 } 53 } 54 }); 55 56 }); 57 } 58 } 59 60 var blogPostsGallery = function() { 61 $(".featured-image-gallery").each(function() { 62 var $this = $(this); 63 var animation = $this.data('animation_images'), 64 autoplay = $this.data('autoplay'), 65 slideshowSpeed = $this.data('slideshowSpeed'), 66 controlNav = $this.data('controlnav'), 67 directionNav = $this.data('directionnav'), 68 prevText = $this.data('prevtext'), 69 nextText = $this.data('nexttext'); 70 71 function escapeHtml(str) { 72 return str.replace(/[&<>"'`=\/]/g, function (s) { 73 return '&#' + s.charCodeAt(0) + ';'; 74 }); 75 } 76 77 prevText = escapeHtml(prevText); 78 nextText = escapeHtml(nextText); 79 $this.flexslider({ 80 animation: animation, 81 slideshow: autoplay, 82 slideshowSpeed: slideshowSpeed, 83 animationSpeed: 1000, 84 animationLoop: true, 85 controlNav: controlNav, 86 directionNav: directionNav, 87 prevText: '<i class="' + prevText + '" aria-hidden="true"></i>', 88 nextText: '<i class="' + nextText + '" aria-hidden="true"></i>', 89 useCCS: false 90 }); 91 }); 92 } 93 94 var blogLoadMore = function() { 95 96 /*var $container_wrap = $('.tf-posts-wrap'); 97 var $container = $('.tf-posts-wrap').find('.tf-posts'); 98 99 $('.navigation.loadmore a').on('click', function(e) { 100 e.preventDefault(); 101 102 $container.after('<div class="tfpost-loading"><span></span></div>'); 103 104 $.ajax({
105 type: "GET", 106 url: $(this).attr('href'), 107 dataType: "html", 108 success: function( out ) { 109 var result = $(out).find('.column'); 110 var nextlink = $(out).find('.navigation.loadmore a').attr('href'); 111 112 result.css({ opacity: 0 , visibility: 'hidden' }); 113 if ($container.hasClass('masonry')) { 114 $container.append(result).imagesLoaded(function () { 115 result.css({ opacity: 1 , visibility: 'visible' }); 116 $container.isotope('appended', result); 117 }); 118 } 119 else { 120 $container.append(result).imagesLoaded(function () { 121 result.css({ opacity: 1 , visibility: 'visible' }); 122 $container.isotope('appended', result); 123 }); 124 } 125 126 if ( nextlink != undefined ) { 127 $('.navigation.loadmore a').attr('href', nextlink); 128 $container_wrap.find('.tfpost-loading').remove(); 129 } else { 130 $container_wrap.find('.tfpost-loading').addClass('no-ajax').text('All posts loaded').delay(2000).queue(function() {$(this).remove();}); 131 $('.navigation.loadmore a').remove(); 132 } 133 } 134 }); 135 });*/ 136 137 $('.tf-posts-wrap .navigation.loadmore a').on('click', function(e) { 138 e.preventDefault(); 139 var class_id = $(this).closest('.tf-posts-wrap').data('class_id'); 140 var class_id_string = '.'+class_id; 141 var $container_wrap = $(class_id_string); 142 var $container = $container_wrap.find('.tf-posts'); 143 var scroll_loadmore = $container_wrap.find('.scroll-loadmore'); 144 145 $(this).closest('.navigation.loadmore').addClass('loader'); 146 147 $.ajax({
148 type: "GET", 149 url: $(this).attr('href'), 150 dataType: "html", 151 success: function( out ) { 152 var result = $(out).find('.column'); 153 var nextlink = $(out).find('.navigation.loadmore a').attr('href'); 154 155 $container.each(function() { 156 $(this).append(result).imagesLoaded(function () { 157 setTimeout(function() { 158 $container.isotope('appended', result); 159 }, 1000); 160 }); 161 }); 162 163 $('.navigation.loadmore').removeClass('loader'); 164 165 if ( nextlink != undefined ) { 166 $('.navigation.loadmore a').attr('href', nextlink); 167 } else { 168 $('.navigation.loadmore').remove(); 169 } 170 171 $('html, body').animate({ 172 scrollTop: scroll_loadmore.offset().top - 300 173 }, 700); 174 } 175 }); 176 }); 177 } 178 179 180 181 var blogMasonry = function() { 182 $('.tf-posts-wrap .tf-posts').each(function(){ 183 var $this = $(this); 184 if ($this.hasClass('masonry')) { 185 var $grid = $this.isotope({ 186 itemSelector: '.column', 187 percentPosition: true, 188 masonry: { 189 columnWidth: '.grid-sizer' 190 } 191 }); 192 193 $grid.imagesLoaded().progress( function() { 194 $grid.isotope('layout'); 195 }); 196 } 197 }); 198 } 199 200 var postFormatIziModal = function(){ 201 if ($('body').find('div').hasClass('izimodal')) { 202 $(".izimodal").iziModal({ 203 width: 850, 204 top: null, 205 bottom: null, 206 borderBottom: false, 207 padding: 0, 208 radius: 3, 209 zindex: 999999, 210 iframe: false, 211 iframeHeight: 400, 212 iframeURL: null, 213 focusInput: false, 214 group: '', 215 loop: false, 216 arrowKeys: true, 217 navigateCaption: true, 218 navigateArrows: true, // Boolean, 'closeToModal', 'closeScreenEdge' 219 history: false, 220 restoreDefaultContent: true, 221 autoOpen: 0, // Boolean, Number 222 bodyOverflow: false, 223 fullscreen: false, 224 openFullscreen: false, 225 closeOnEscape: true, 226 closeButton: true, 227 appendTo: 'body', // or false 228 appendToOverlay: 'body', // or false 229 overlay: true, 230 overlayClose: true, 231 overlayColor: 'rgba(0, 0, 0, .7)', 232 timeout: false, 233 timeoutProgressbar: false, 234 pauseOnHover: false, 235 timeoutProgressbarColor: 'rgba(255,255,255,0)', 236 transitionIn: 'comingIn', 237 transitionOut: 'comingOut', 238 transitionInOverlay: 'fadeIn', 239 transitionOutOverlay: 'fadeOut', 240 onFullscreen: function(){}, 241 onResize: function(){}, 242 onOpening: function(){}, 243 onOpened: function(){}, 244 onClosing: function(){}, 245 onClosed: function(){}, 246 afterRender: function(){} 247 }); 248 249 $(document).on('click', '.trigger', function (event) { 250 event.preventDefault(); 251 $('.izimodal').iziModal('setZindex', 99999999); 252 $('.izimodal').iziModal('open', { zindex: 99999999 }); 253 $('.izimodal').iziModal('open'); 254 }); 255 } 256 } 257 258 259$(window).on('elementor/frontend/init', function() { 260 elementorFrontend.hooks.addAction( 'frontend/element_ready/tfposts.default', blogPostsOwl ); 261 elementorFrontend.hooks.addAction( 'frontend/element_ready/tfposts.default', blogPostsGallery ); 262 elementorFrontend.hooks.addAction( 'frontend/element_ready/tfposts.default', blogLoadMore ); 263 elementorFrontend.hooks.addAction( 'frontend/element_ready/tfposts.default', blogMasonry ); 264 elementorFrontend.hooks.addAction( 'frontend/element_ready/tfposts.default', postFormatIziModal ); 265}); 266 267})(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.