1jQuery(document).ready(function(){ 2jQuery(".ecs-load-more-button").each(function(){ 3widget=jQuery(this); 4settings=widget.attr("data-settings"); 5args=JSON.parse(settings); 6widget.children(".elementor-button").attr("href", "javascript:ECS_load_next_page('"+ args.widget_id +"');"); 7}); 8}); 9var canBeLoaded=true; 10function ECS_load_next_page(id){ 11widget=jQuery(".elementor-element[data-id='" + id + "'] .ecs-posts"); 12settings=widget.attr("data-settings"); 13args=JSON.parse(settings); 14posts=jQuery(".elementor-element[data-id='" + args.widget_id + "'] .ecs-posts"); 15if(args.load_method=='loadmore'){ 16button_text=jQuery(".elementor-element[data-id='" + args.widget_id + "'] .ecs-load-more-button .elementor-button"); 17button=jQuery(".elementor-element[data-id='" + args.widget_id + "'] .ecs-load-more-button"); 18attb=JSON.parse(button.attr("data-settings")); 19} 20if(args.load_method=='lazyload'){ 21animation=jQuery(".elementor-element[data-id='" + args.widget_id + "'] .ecs-lazyload"); 22} 23data={ 24'action': 'ecsload', 25'nonce': ecs_ajax_params.nonce, 26'query': ecs_ajax_params.posts, 27'ecs_ajax_settings': settings, 28}; 29jQuery.ajax({ 30url:ecs_ajax_params.ajaxurl, 31data:data, 32type:'POST', 33beforeSend:function(xhr){ 34if(args.load_method=='loadmore') button_text.html(attb.loading_text); 35canBeLoaded=false; 36}, 37success:function(data){ 38if(data){ 39posts.append(data); 40args.current_page++; 41if(args.load_method=='loadmore'){ 42button_text.html(attb.text); 43button_text.blur(); 44} 45newsettings=JSON.stringify(args); 46widget.attr("data-settings",newsettings); 47if(args.load_method=='lazyload'){jQuery(animation).addClass("animation-hidden");} 48ECS_do_action('ajax',args); 49if(args.current_page==args.max_num_pages){ 50if(args.load_method=='loadmore') button.remove(); 51if(args.load_method=='lazyload') animation.remove(); 52} 53canBeLoaded=true; 54if(typeof ECScheckInView!=='undefined') ECScheckInView(); 55}else{ 56if(args.load_method=='loadmore'){button.remove();} 57if(args.load_method=='lazyload'){animation.remove();}} 58}}); 59} 60jQuery(function($){ 61$('.ecs-lazyload').addClass("animation-hidden"); 62$('.ecs-lazyload a').css("display", "none"); 63}); 64function EleCustomSkinChangeUrlPage(args){ 65if(!args.change_url) return; 66regex=/\/page\/[0-9]+\//gm; 67currenturl=window.location.pathname; 68newurl=currenturl.replace(regex, '/'); 69newurl=newurl + 'page/' + args.current_page +'/'; 70console.log(newurl); 71history.pushState({urlPath:newurl},"",newurl); 72} 73function EleCustomSkinReInitJs(args){ 74if(!args.reinit_js) return; 75jQuery('.elementor-element-' + args.widget_id + ' .elementor-element').each(function(){ elementorFrontend.elementsHandler.runReadyTrigger(jQuery(this)); });console.log(args.reinit_js); 76} 77jQuery(document).ready(function(){ 78ECS_add_action("ajax", function(args){EleCustomSkinChangeUrlPage(args)}); 79ECS_add_action("ajax", function(args){EleCustomSkinReInitJs(args)}); 80});
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.