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