1( function( $ ) { 2 $.sep_grid_refresh = function (){ 3 $('.pxl-grid-masonry').each(function () { 4 var iso = new Isotope(this, { 5 itemSelector: '.pxl-grid-item', 6 percentPosition: true, 7 masonry: { 8 columnWidth: '.grid-sizer', 9 }, 10 containerStyle: null, 11 stagger: 30, 12 sortBy : 'name', 13 }); 14 15 var filtersElem = $(this).parent().find('.pxl-grid-filter'); 16 filtersElem.on('click', function (event) { 17 var filterValue = event.target.getAttribute('data-filter'); 18 iso.arrange({filter: filterValue}); 19 }); 20 21 var filterItem = $(this).parent().find('.filter-item'); 22 filterItem.on('click', function (e) { 23 filterItem.removeClass('active'); 24 $(this).addClass('active'); 25 }); 26 27 var filtersSelect = $(this).parent().find('.pxl-grid-filter'); 28 filtersSelect.change(function() { 29 var filters = $(this).val(); 30 iso.arrange({filter: filters}); 31 }); 32 33 var orderSelect = $(this).parent().find('.pxl-grid-filter'); 34 orderSelect.change(function() { 35 var e_order = $(this).val(); 36 if(e_order == 'asc') { 37 iso.arrange({sortAscending: false}); 38 } 39 if(e_order == 'des') { 40 iso.arrange({sortAscending: true}); 41 } 42 }); 43 44 $('.pxl-service-grid1').each(function () { 45 $(this).find('.pxl-grid-item-inner').hover(function () { 46 $(this).parents('.elementor-element').find('.pxl-grid-item-inner').removeClass('active'); 47 $(this).addClass('active'); 48 }); 49 }); 50 51 }); 52 } 53 54 55 var widget_post_masonry_handler = function( $scope, $ ) { 56 $('.pxl-grid-masonry').imagesLoaded(function(){ 57 $.sep_grid_refresh(); 58 }); 59 }; 60 61 $(document).ajaxComplete(function(event, xhr, settings){ 62 "use strict"; 63 $(document).on('click', '.pxl-grid-filter .filter-item', function (e) { 64 $(this).siblings('.filter-item').removeClass('active'); 65 $(this).addClass('active'); 66 }); 67 }); 68 69 $(document).on('click', '.pxl-load-more', function(){ 70 var loadmore = $(this).data('loadmore'); 71 var perpage = loadmore.perpage; 72 var _this = $(this).parents(".pxl-grid"); 73 var layout_type = _this.data('layout'); 74 var loading_text = $(this).data('loading-text'); 75 var loadmore_text = $(this).data('loadmore-text'); 76 loadmore.paged = parseInt(_this.data('start-page')) +1; 77 $(this).addClass('loading'); 78 $(this).find('.pxl-btn-icon').addClass('loading'); 79 $(this).find('.pxl-btn-text').text(loading_text); 80 81 if(loadmore.filter == 'true'){ 82 $.ajax({ 83 url: main_data.ajax_url, 84 type: 'POST', 85 beforeSend: function () { 86 87 }, 88 data: { 89 action: 'orritech_get_filter_html', 90 settings: loadmore, 91 loadmore_filter: 1 92 } 93 }).done(function (res) { 94 if(res.status == true){ 95 _this.find(".pxl-grid-filter .pxl--filter-inner").html(res.data.html); 96 } 97 else if(res.status == false){ 98 } 99 }).fail(function (res) { 100 return false; 101 }).always(function () { 102 return false; 103 }); 104 } 105 106 $.ajax({ 107 url: main_data.ajax_url, 108 type: 'POST', 109 beforeSend: function () { 110 111 }, 112 data: { 113 action: 'orritech_load_more_post_grid', 114 settings: loadmore 115 } 116 }) 117 .done(function (res) { 118 if(res.status == true) { 119 _this.find('.pxl-load-more').removeClass('loading'); 120 _this.find('.pxl-grid-inner').append(res.data.html); 121 _this.data('start-page', res.data.paged); 122 $.sep_grid_refresh(); 123 if(res.data.paged >= res.data.max){ 124 _this.find('.pxl-load-more').hide(); 125 } 126 127 /* Direction Effect */ 128 function PXLgetDirection(ev, obj) { 129 var w = $(obj).width(), 130 h = $(obj).height(), 131 x = (ev.pageX - $(obj).offset().left - (w / 2)) * (w > h ? (h / w) : 1), 132 y = (ev.pageY - $(obj).offset().top - (h / 2)) * (h > w ? (w / h) : 1), 133 d = Math.round( Math.atan2(y, x) / 1.57079633 + 5 ) % 4; 134 return d; 135 } 136 function PXLaddClass( ev, obj, state ) { 137 var direction = PXLgetDirection( ev, obj ), 138 class_suffix = null; 139 $(obj).removeAttr('class'); 140 switch ( direction ) { 141 case 0 : class_suffix = '--top'; break; 142 case 1 : class_suffix = '--right'; break; 143 case 2 : class_suffix = '--bottom'; break; 144 case 3 : class_suffix = '--left'; break; 145 } 146 $(obj).addClass( state + class_suffix ); 147 } 148 $.fn.PXLDeriction = function () { 149 this.each(function () { 150 $(this).on('mouseenter',function(ev){ 151 PXLaddClass( ev, this, 'pxl-in' ); 152 }); 153 $(this).on('mouseleave',function(ev){ 154 PXLaddClass( ev, this, 'pxl-out' ); 155 }); 156 }); 157 } 158 $('.pxl-effect--3d .pxl-effect--direction').PXLDeriction(); 159 /* End Direction Effect */ 160 } 161 162 }) 163 .fail(function (res) { 164 _this.find('.btn').hide(); 165 return false;
166 }) 167 .always(function () { 168 return false; 169 }); 170 }); 171 172 $(document).on('click', '.pxl-grid-pagination .ajax a.page-numbers', function(){ 173 var _this = $(this).parents(".pxl-grid"); 174 var loadmore = _this.find(".pxl-grid-pagination").data('loadmore'); 175 var query_vars = _this.find(".pxl-grid-pagination").data('query'); 176 177 var layout_type = _this.data('layout'); 178 var paged = $(this).attr('href'); 179 paged = paged.replace('#', ''); 180 loadmore.paged = parseInt(paged); 181 query_vars.paged = parseInt(paged); 182 var _class = loadmore.pagin_align_cls; 183 184 $('html,body').animate({scrollTop: _this.offset().top - 100}, 750); 185 186 // reload filter 187 if(loadmore.filter == 'true'){ 188 $.ajax({ 189 url: main_data.ajax_url, 190 type: 'POST', 191 beforeSend: function () { 192 193 }, 194 data: { 195 action: 'orritech_get_filter_html', 196 settings: loadmore 197 } 198 }).done(function (res) { 199 if(res.status == true){ 200 _this.find(".pxl-grid-filter .pxl--filter-inner").html(res.data.html); 201 } 202 else if(res.status == false){ 203 } 204 }).fail(function (res) { 205 return false; 206 }).always(function () { 207 return false; 208 }); 209 } 210 211 // reload pagination 212 $.ajax({ 213 url: main_data.ajax_url, 214 type: 'POST', 215 beforeSend: function () { 216 217 }, 218 data: { 219 action: 'orritech_get_pagination_html', 220 query_vars: query_vars, 221 cls: _class 222 } 223 }).done(function (res) { 224 if(res.status == true){ 225 _this.find(".pxl-grid-pagination").html(res.data.html); 226 } 227 else if(res.status == false){ 228 } 229 }).fail(function (res) { 230 return false; 231 }).always(function () { 232 return false; 233 }); 234 235 // load post 236 $.ajax({ 237 url: main_data.ajax_url, 238 type: 'POST', 239 beforeSend: function () { 240 241 }, 242 data: { 243 action: 'orritech_load_more_post_grid', 244 settings: loadmore 245 } 246 }).done(function (res) { //console.log(res); return false; 247 if(res.status == true){ 248 _this.find('.pxl-grid-inner .pxl-grid-item').remove(); 249 _this.find('.pxl-grid-inner').append(res.data.html); 250 _this.data('start-page', res.data.paged); 251 if(layout_type == 'masonry'){ 252 253 /* Direction Effect */ 254 function PXLgetDirection(ev, obj) { 255 var w = $(obj).width(), 256 h = $(obj).height(), 257 x = (ev.pageX - $(obj).offset().left - (w / 2)) * (w > h ? (h / w) : 1), 258 y = (ev.pageY - $(obj).offset().top - (h / 2)) * (h > w ? (w / h) : 1), 259 d = Math.round( Math.atan2(y, x) / 1.57079633 + 5 ) % 4; 260 return d; 261 } 262 function PXLaddClass( ev, obj, state ) { 263 var direction = PXLgetDirection( ev, obj ), 264 class_suffix = null; 265 $(obj).removeAttr('class'); 266 switch ( direction ) { 267 case 0 : class_suffix = '--top'; break; 268 case 1 : class_suffix = '--right'; break; 269 case 2 : class_suffix = '--bottom'; break; 270 case 3 : class_suffix = '--left'; break; 271 } 272 $(obj).addClass( state + class_suffix ); 273 } 274 $.fn.PXLDeriction = function () { 275 this.each(function () { 276 $(this).on('mouseenter',function(ev){ 277 PXLaddClass( ev, this, 'pxl-in' ); 278 }); 279 $(this).on('mouseleave',function(ev){ 280 PXLaddClass( ev, this, 'pxl-out' ); 281 }); 282 }); 283 } 284 $('.pxl-effect--3d .pxl-effect--direction').PXLDeriction(); 285 /* End Direction Effect */ 286 287 $.sep_grid_refresh(); 288 } 289 290 } 291 else if(res.status == false){ 292 } 293 }).fail(function (res) { 294 return false;
295 }).always(function () { 296 return false; 297 }); 298 return false; 299 }); 300 301 // Make sure you run this code under Elementor. 302 $( window ).on( 'elementor/frontend/init', function() { 303 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_post_grid.default', widget_post_masonry_handler ); 304 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_showcase_grid.default', widget_post_masonry_handler ); 305 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_testimonial_grid.default', widget_post_masonry_handler ); 306 elementorFrontend.hooks.addAction( 'frontend/element_ready/pxl_team_grid.default', widget_post_masonry_handler ); 307 } ); 308} )( 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.