1( function( $ ) { 2 3 var dtBlogPosts = function($scope, $) { 4 5 const $slider_option = $scope.find('.wdt-posts-list-wrapper.swiper-container'); 6 const $carouseleffect = $slider_option.data('carouseleffect'); 7 const $carouselslidesperview = $slider_option.data('carouselslidesperview'); 8 const $carouselloopmode = $slider_option.data('carouselloopmode'); 9 const $carouselmousewheelcontrol = $slider_option.data('carouselmousewheelcontrol'); 10 const $carouselbulletpagination = $slider_option.data('carouselbulletpagination'); 11 const $carouselarrowpagination = $slider_option.data('carouselarrowpagination'); 12 const $carouselscrollbar = $slider_option.data('carouselscrollbar'); 13 const $moduleId = $slider_option.data('id'); 14 const $carouselresponsive = $slider_option.data('carouselresponsive'); 15 16 if($carouselresponsive === undefined) { 17 return; 18 } 19 if($slider_option === undefined) { 20 return; 21 } 22 23 const swiperOptions = { 24 initialSlide: 0, 25 simulateTouch: true, 26 // roundLengths: true, 27 keyboardControl: true, 28 paginationClickable: true, 29 autoHeight: true, 30 grabCursor: true, 31 32 slidesPerView: $carouselslidesperview, 33 loop:$carouselloopmode, 34 mousewheel: $carouselmousewheelcontrol, 35 direction: 'horizontal', 36 37 updateOnWindowResize: true, 38 39 effect: $carouseleffect, 40 } 41 42 // Arrow pagination 43 if ($carouselarrowpagination == true) { 44 swiperOptions.navigation = { 45 prevEl: '.wdt-products-arrow-prev-'+$moduleId, 46 nextEl: '.wdt-products-arrow-next-'+$moduleId 47 }; 48 } 49 50 // Bullets pagination 51 if ($carouselbulletpagination == true) { 52 swiperOptions.pagination = { 53 el: ".wdt-products-bullet-pagination", 54 type: 'bullets', 55 clickable: true, 56 }; 57 } 58 59 // scrollbar pagination 60 if ($carouselscrollbar == true) { 61 swiperOptions.scrollbar = { 62 el: ".wdt-products-scrollbar", 63 hide: false, 64 draggable: true, 65 }; 66 } 67 68 // Update breakpoints 69 const $responsiveSettings = $carouselresponsive['responsive']; 70 const $responsiveData = {}; 71 jQuery.each($responsiveSettings, function (index, value) { 72 $responsiveData[value.breakpoint] = { 73 slidesPerView: value.toshow, 74 }; 75 }); 76 swiperOptions['breakpoints'] = $responsiveData; 77 78 //Blog carousel 79 const swiperGallery = new Swiper('.wdt-post-list-carousel-'+$moduleId, swiperOptions); 80 81 $scope.find('.wdt-posts-list-wrapper').each(function() { 82 83 var $page = 1; 84 var $T = $(this); 85 var $data = "", $content = $T.find('.tpl-blog-holder'); 86 87 // When load more button click... 88 $('.wdt-posts-list-wrapper').on( "click", ".loadmore-elementor-btn.more-items", function() { 89 90 var $this = $(this); 91 var $count = $this.attr('data-count'), $cats = $this.attr('data-cats'), $style = $this.attr('data-style'), 92 $layout = $this.attr('data-layout'), $column = $this.attr('data-column'), $list_type = $this.attr('data-listtype'),
93 $hover = $this.attr('data-hover'), $overlay = $this.attr('data-overlay'), $align = $this.attr('data-align'), 94 $mpages = $this.attr('data-maxpage'), $pos = $this.attr('data-pos'), $eheight = $this.attr('data-eheight'), 95 $meta = $this.attr('data-meta'), $blogpostloadmore_nonce = $this.attr('data-blogpostloadmore-nonce'), 96 $settings = $this.attr('data-settings'); 97 98 if( $meta != '' ) { 99 $meta = JSON.parse( $meta ); 100 } 101 102 $content.addClass('loading'); 103 104 if( $this.hasClass('more-items') ) { 105 $page++; 106 } 107 108 $.ajax({ 109 type : "post", 110 dataType : "html", 111 url : gaaga_urls.ajaxurl, 112 data : { action: "blog_elementor_sc_load_more_post", count: $count, cats: $cats, pos: $pos, style: $style, layout: $layout, column: $column, pageNumber: $page, listtype: $list_type, hover: $hover, overlay: $overlay, align: $align, meta: $meta, blogpostloadmore_nonce: $blogpostloadmore_nonce, settings: $settings }, 113 cache: true, 114 success: function (data) { 115 var $res = data.split('#####$$$$$'); 116 if ( $res.length > 0 ) { 117 118 $content.append($res[0]); 119 $T.find('.loadmore-elementor-btn').attr('data-pos', $res[1]); 120 121 var newbx = $content.find('ul.entry-gallery-post-slider'); 122 if( newbx !== null ) { 123 newbx.bxSlider({mode: 'fade', auto:false, video:true, pager:'', autoHover:true, adaptiveHeight:false, responsive: true}); 124 } 125 126 if( $eheight == null || $eheight == false ) { 127 $content.css({overflow:'hidden'}).isotope( 'reloadItems' ).isotope(); 128 $(window).trigger( 'resize' ); 129 } 130 131 if( parseInt( $page ) >= parseInt( $mpages ) ) { 132 $T.find('.loadmore-elementor-btn').removeClass('more-items').html('All Posts Loaded'); 133 } else { 134 $T.find('.loadmore-elementor-btn').addClass('more-items'); 135 } 136 } 137 $content.removeClass('loading'); 138 }, 139 error: function (jqXHR, textStatus, errorThrown) { 140 $content.html('No More Posts Found'); 141 } 142 }); 143 return false; 144 }); 145 146 // WHen window scroll... 147 $(window).scroll(function(){ 148 var $c = $T.find('.infinite-elementor-btn.more-items'); 149 150 var ST = $(window).scrollTop(); 151 var DH = $(document).height(); 152 var WH = $(window).height(); 153 154 if( ( parseInt(ST) == parseInt(DH) - parseInt(WH) ) && $c.length > 0 ){ 155 156 var $count = $c.attr('data-count'), $cats = $c.attr('data-cats'), $style = $c.attr('data-style'), $layout = $c.attr('data-layout'), 157 $column = $c.attr('data-column'), $list_type = $c.attr('data-listtype'), $hover = $c.attr('data-hover'), 158 $overlay = $c.attr('data-overlay'), $align = $c.attr('data-align'), $mpages = $c.attr('data-maxpage'), 159 $pos = $c.attr('data-pos'), $eheight = $c.attr('data-eheight'), $meta = $c.attr('data-meta'), 160 $blogpostloadmore_nonce = $c.attr('data-blogpostloadmore-nonce'), $settings = $c.attr('data-settings'); 161 162 if( $meta != '' ) { 163 $meta = JSON.parse( $meta ); 164 } 165 166 $content.addClass('loading'); 167 168 $page++; 169 170 $.ajax({
171 type : "post", 172 dataType : "html", 173 url : gaaga_urls.ajaxurl, 174 data : { action: "blog_elementor_sc_load_more_post", count: $count, cats: $cats, pos: $pos, style: $style, layout: $layout, column: $column, pageNumber: $page, listtype: $list_type, hover: $hover, overlay: $overlay, align: $align, meta: $meta, blogpostloadmore_nonce: $blogpostloadmore_nonce, settings: $settings }, 175 cache: true, 176 success: function (data) { 177 var $res = data.split('#####$$$$$'); 178 if ( $res.length > 0 ) { 179 180 $content.append($res[0]); 181 $T.find('.infinite-elementor-btn').attr('data-pos', $res[1]); 182 183 var newbx = $content.find('ul.entry-gallery-post-slider'); 184 if( newbx !== null ) { 185 newbx.bxSlider({mode: 'fade', auto:false, video:true, pager:'', autoHover:true, adaptiveHeight:false, responsive: true}); 186 } 187 188 if( $eheight == null || $eheight == false ) { 189 $content.css({overflow:'hidden'}).isotope( 'reloadItems' ).isotope(); 190 $(window).trigger( 'resize' ); 191 } 192 193 if( parseInt( $page ) >= parseInt( $mpages ) ) { 194 $c.removeClass('more-items'); 195 } 196 } 197 $content.removeClass('loading'); 198 }, 199 error: function (jqXHR, textStatus, errorThrown) { 200 $content.html('No More Posts Found'); 201 } 202 }); 203 return false; 204 } 205 }); 206 }); 207 }; 208 209 $(window).on('elementor/frontend/init', function(){ 210 elementorFrontend.hooks.addAction('frontend/element_ready/wdt-blog-posts.default', dtBlogPosts); 211 }); 212 213} )( 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.