1 2( function (jQuery, elementor) { 3 "use strict"; 4 5 6 var VIBENEWS = { 7 8 init: function () { 9 10 var widgets = { 11 12 'posts-medium-list-load-main.default': VIBENEWS.Posts_medium_list_load, 13 //'posts-block.default': VIBENEWS.MainSlider, 14 15 16 17 }; 18 19 jQuery.each(widgets, function (widget, callback) { 20 elementorFrontend.hooks.addAction('frontend/element_ready/' + widget, callback); 21 }); 22 23 }, 24 25 26 27 /* ----------------------------------------------------------- */ 28 /* Post grid ajax load 29 /* ----------------------------------------------------------- */ 30 31 Posts_medium_list_load:function(jQueryscope){ 32 33 var jQuerycontainer = jQueryscope.find('.vibenews-load-more-btn'); 34 35 if (jQuerycontainer.length > 0) { 36 jQuerycontainer.on('click',function(event){ 37 event.preventDefault(); 38 if (jQuery.active > 0) { 39 return; 40 } 41 var jQuerythat = jQuery(this); 42 var ajaxjsondata = jQuerythat.data('json_grid_meta'); 43 var vibenews_json_data = Object (ajaxjsondata); 44 45 var contentwrap = jQueryscope.find('.grid-loadmore-content'), // item contentwrap 46 47 postperpage = parseInt(vibenews_json_data.posts_per_page), // post per page number 48 showallposts = parseInt(vibenews_json_data.total_post); // total posts count 49 50 var items = contentwrap.find('.grid-item'), 51 totalpostnumber = parseInt(items.length), 52 paged = parseInt( totalpostnumber / postperpage ) + 1; // paged number 53 54 jQuery.ajax({ 55 url: vibenews_ajax.ajax_url, 56 type: 'POST', 57 data: {action: 'vibenews_post_ajax_loading',ajax_json_data: ajaxjsondata,paged:paged}, 58 beforeSend: function(){ 59 60 jQuery('<i class="ts-icon ts-icon-spinner fa-spin" style="margin-left:10px"></i>').appendTo( "#vibenews-load-more-btn" ).fadeIn(100); 61 }, 62 complete:function(){ 63 jQueryscope.find('.vibenews-load-more-btn .fa-spinner ').remove(); 64 } 65 }) 66 67 .done(function(data) { 68 69 var jQuerypstitems = jQuery(data); 70 jQueryscope.find('.grid-loadmore-content').append( jQuerypstitems ); 71 var newLenght = contentwrap.find('.grid-item').length; 72 73 if(showallposts <= newLenght){ 74 jQueryscope.find('.vibenews-load-more-btn').fadeOut(300,function(){ 75 jQueryscope.find('.vibenews-load-more-btn').remove(); 76 }); 77 } 78 79 }) 80 81 .fail(function() { 82 jQueryscope.find('.vibenews-load-more-btn').remove(); 83 }); 84 85 }); 86 } 87 88 89 }, 90 91 92 }; 93 94 jQuery(window).on('elementor/frontend/init', VIBENEWS.init); 95 96 97 98}(jQuery, window.elementorFrontend) );
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.