1jQuery(document).ready(function ($) { 2 if (!$('.penci-ajax-more-scroll .penci-ajax-more-button').length) { 3 return; 4 } 5 6 var pc_ajax_more_scrll = function () { 7 8 $('.penci-ajax-more-scroll .penci-ajax-more-button').each(function () { 9 var $this_scroll = $(this); 10 $(window).on('scroll', $this_scroll, function () { 11 var hT = $this_scroll.offset().top, 12 hH = $this_scroll.outerHeight(), 13 wH = $(window).height(), 14 wS = $(this).scrollTop(); 15 16 if ((wS > (hT + hH - wH)) && $this_scroll.length) { 17 if (!$this_scroll.hasClass('loading-posts')) { 18 var layout = $this_scroll.data('layout'), 19 ppp = $this_scroll.data('number'), 20 mes = $this_scroll.data('mes'), 21 offset = $this_scroll.attr('data-offset'), 22 exclude = $this_scroll.data('exclude'), 23 from = $this_scroll.data('from'), 24 comeFrom = $this_scroll.data('come_from'), 25 mixed = $this_scroll.data('mixed'), 26 query = $this_scroll.data('query'), 27 infeedads = $this_scroll.data('infeedads'), 28 number = $this_scroll.data('number'), 29 query_type = $this_scroll.data('query_type'), 30 archivetype = $this_scroll.data('archivetype'), 31 archivevalue = $this_scroll.data('archivevalue'), 32 archiveorder = $this_scroll.data('order'), 33 tag = $this_scroll.data('tag'), 34 cat = $this_scroll.data('cat'), 35 author = $this_scroll.data('author'), 36 template = $this_scroll.data('template'); 37 38 $this_scroll.addClass('loading-posts'); 39 40 var OBjBlockData = penciGetOBjBlockData($this_scroll.attr('data-blockuid')), 41 dataFilter = OBjBlockData.atts_json ? JSON.parse(OBjBlockData.atts_json) : OBjBlockData.atts_json; 42 43 var data = { 44 action: 'penci_more_post_ajax', 45 query: query, 46 offset: offset, 47 mixed: mixed, 48 layout: layout, 49 exclude: exclude, 50 from: from, 51 comefrom: comeFrom, 52 datafilter: dataFilter, 53 template: template, 54 infeedads: infeedads, 55 ppp: ppp, 56 tag: tag, 57 author: author, 58 cat: cat, 59 number: number, 60 query_type: query_type, 61 archivetype: archivetype, 62 archivevalue: archivevalue, 63 order: archiveorder, 64 nonce: pajax_mscroll.nonce, 65 }; 66 67 68 $.ajax({ 69 type: "POST", 70 dataType: "html", 71 url: ajax_var_more.url, 72 data: data, 73 success: function (data) { 74 if (data) { 75 var data_offset = parseInt(offset) + ppp, 76 $wrap_content = $this_scroll.parent().parent().find('.penci-wrapper-data'); 77 78 $this_scroll.attr('data-offset', data_offset); 79 if (layout === 'masonry' || layout === 'masonry-2') { 80 var $data = $(data); 81 $wrap_content.append($data).isotope('appended', $data).imagesLoaded(function () { 82 $wrap_content.isotope('layout'); 83 }); 84 85 $(".container").fitVids(); 86 87 if ($().easyPieChart) { 88 $('.penci-piechart').each(function () { 89 var $this = $(this); 90 $this.one('inview', function (event, isInView, visiblePartX, visiblePartY) { 91 var chart_args = { 92 barColor: $this.data('color'), 93 trackColor: $this.data('trackcolor'), 94 scaleColor: false, 95 lineWidth: $this.data('thickness'), 96 size: $this.data('size'), 97 animate: 1000 98 }; 99 $this.easyPieChart(chart_args); 100 }); // bind inview 101 }); // each 102 } 103 104 } else { 105 var $data = $(data); 106 $wrap_content.append($data); 107 108 $(".container").fitVids(); 109 110 if ($().easyPieChart) { 111 $('.penci-piechart').each(function () { 112 var $this = $(this); 113 $this.one('inview', function (event, isInView, visiblePartX, visiblePartY) { 114 var chart_args = { 115 barColor: $this.data('color'), 116 trackColor: $this.data('trackcolor'), 117 scaleColor: false, 118 lineWidth: $this.data('thickness'), 119 size: $this.data('size'), 120 animate: 1000 121 }; 122 $this.easyPieChart(chart_args); 123 }); // bind inview 124 }); // each 125 } 126 127 var $justified_gallery = $('.penci-post-gallery-container.justified'); 128 var $masonry_gallery = $('.penci-post-gallery-container.masonry'); 129 if ($().justifiedGallery && $justified_gallery.length) { 130 $('.penci-post-gallery-container.justified').each(function () { 131 var $this = $(this); 132 $this.justifiedGallery({ 133 rowHeight: $this.data('height'), 134 lastRow: 'nojustify', 135 margins: $this.data('margin'), 136 randomize: false 137 }); 138 }); // each .penci-post-gallery-container 139 } 140 141 if ($().isotope && $masonry_gallery.length) { 142 143 $('.penci-post-gallery-container.masonry .item-gallery-masonry').each(function () { 144 var $this = $(this); 145 if ($this.attr('title')) { 146 var $title = $this.attr('title'); 147 $this.children().append('<div class="caption">' + $title + '</div>'); 148 } 149 }); 150 } 151 152 if ($masonry_gallery.length) { 153 $masonry_gallery.each(function () { 154 var $this = $(this); 155 $this.imagesLoaded(function () { 156 // initialize isotope 157 $this.isotope({ 158 itemSelector: '.item-gallery-masonry', 159 transitionDuration: '.55s', 160 layoutMode: 'masonry' 161 }); 162 163 $this.addClass('loaded'); 164 165 $('.penci-post-gallery-container.masonry .item-gallery-masonry').each(function () { 166 var $this = $(this); 167 $this.one('inview', function (event, isInView, visiblePartX, visiblePartY) { 168 $this.addClass('animated'); 169 }); // inview 170 }); // each 171 }); 172 }); 173 } 174 175 if ($().theiaStickySidebar) { 176 var top_margin = 90; 177 if ($('body').hasClass('admin-bar')) { 178 top_margin = 122; 179 } 180 $('#main.penci-main-sticky-sidebar, #sidebar.penci-sticky-sidebar').theiaStickySidebar({ 181 // settings 182 additionalMarginTop: top_margin 183 }); 184 } // if sticky 185 } 186 187 $('body').trigger( 'penci_swiper_sliders' ); 188 $this_scroll.removeClass('loading-posts'); 189 $(document).trigger('penci_bf_check'); 190 191 } else { 192 $this_scroll.find(".ajax-more-text").text(mes); 193 $this_scroll.find("i").remove(); 194 $this_scroll.removeClass('loading-posts'); 195 setTimeout(function () { 196 $this_scroll.parent().remove(); 197 }, 1200); 198 } 199 }, 200 error: function (jqXHR, textStatus, errorThrown) { 201 console.log(jqXHR + " :: " + textStatus + " :: " + errorThrown); 202 } 203 204 }); 205 } 206 } 207 }); 208 }); 209 } 210 211 pc_ajax_more_scrll(); 212 213 $(document).on('pcajax_loaded', function () { 214 pc_ajax_more_scrll(); 215 }); 216 217 function penciGetOBjBlockData($blockID) { 218 var $obj = new penciBlock(); 219 220 jQuery.each(penciBlocksArray, function (index, block) { 221 222 if (block.blockID === $blockID) { 223 $obj = penciBlocksArray[index]; 224 } 225 }); 226 227 return $obj; 228 } 229});
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.