1function loadMoreNews() { 2 if ($('.LoadMoreList').length < 1) { 3 return; 4 } 5 6 var container = $('.LoadMoreList'), 7 button = container.find('.loadmoreBtn'), 8 preloader = container.find('.defaultpreloader'), 9 pagination = container.find('.page-navigation, .f3-widget-paginator'), 10 newsToLoad = []; 11 12 // Verstecke Button wenn keine Pagination 13 if (pagination.length < 1) { 14 button.hide(); 15 } 16 17 // Paginationslinks auslesen 18 pagination.find('li:not(.current):not(.next):not(.previous)').each(function () { 19 newsToLoad.push($(this).find('a').attr('href')); 20 }); 21 22 // Button Event & Ajax-Request 23 button.not('.loading').on('click', function (e) { 24 e.preventDefault(); 25 26 container.addClass('contentLoading'); 27 container.find('.article').addClass('loadedArticles'); 28 29 if (preloader.hasClass('loading')) { 30 return; 31 } 32 preloader.addClass('loading').fadeIn(); 33 34 $.ajax({ 35 async: 'true', 36 url: newsToLoad[0] + '?type=1984', 37 type: 'POST', 38 dataType: 'html', 39 success: function (data) { 40 container.find('.article:last').after($(data).find(".ajax-content").html()); 41 ll = new LazyLoad({ 42 elements_selector: ".lazy", 43 effect : "fadeIn", 44 effectTime: 200, 45 load_delay: 30, 46 threshold: 300, 47 }); 48 container.find('img[data-img-lazy]').each(function() { 49 var image = $(this), 50 imageSource = $(this).attr('data-img-lazy'), 51 imageToLoad = document.createElement('img'); 52 53 image.attr('src', imageSource); 54 image.removeAttr('data-img-lazy'); 55 }); 56 newsToLoad.shift(); 57 preloader.removeClass('loading').fadeOut(); 58 if (newsToLoad.length == 0) { 59 button.remove(); 60 preloader.remove(); 61 } 62 setTimeout(function () { 63 $('.article:not(.loadedArticles)').addClass('loadedArticles'); 64 }, 200); 65 setTimeout(function () { 66 container.removeClass('contentLoading'); 67 }, 900); 68 }, 69 error: function (error) { 70 preloader.removeClass('loading').fadeOut(); 71 } 72 }); 73 }); 74} 75 76function filterNews() { 77 var container = $('.LoadMoreList'), 78 catdata, 79 thisurl = window.location.href; 80 81 // FILTER 82 $('.category-filter-item a').on('click', function (e) { 83 e.preventDefault(); 84 85 container.addClass('contentLoading'); 86 container.find('.article').addClass('loadedArticles'); 87 container.find('img[data-img-lazy]').each(function() { 88 var image = $(this), 89 imageSource = $(this).attr('data-img-lazy'), 90 imageToLoad = document.createElement('img'); 91 92 image.attr('src', imageSource); 93 image.removeAttr('data-img-lazy'); 94 }); 95 96 $('.category-filter-item').removeClass('active'); 97 $(this).parent().addClass('active'); 98 99 if (Modernizr.mq('(max-width: 768px)')) { 100 jQuery('.category-title-content').text(jQuery(this).text()); 101 jQuery('.category-tree-wrap').slideUp(); 102 jQuery('.category-title-wrap ').removeClass('filterOpen'); 103 } 104 105 if($(this).parent().hasClass('catFilterAll')){ 106 var catdata = thisurl + '?type=1984'; 107 }else { 108 var catdata = $(this).attr('href') + '?type=1984'; 109 } 110 111 console.log(catdata); 112 113 $.ajax({
114 async: 'true', 115 url: catdata, 116 type: 'POST', 117 dataType: 'html', 118 success: function (data) { 119 container.html($(data).find(".LoadMoreList").html()); 120 container.find('img[data-img-lazy]').each(function() { 121 var image = $(this), 122 imageSource = $(this).attr('data-img-lazy'), 123 imageToLoad = document.createElement('img'); 124 125 image.attr('src', imageSource); 126 image.removeAttr('data-img-lazy'); 127 }); 128 setTimeout(function(){ 129 $('.article:not(.loadedArticles)').addClass('loadedArticles'); 130 }, 200); 131 setTimeout(function(){ 132 container.removeClass('contentLoading'); 133 }, 900); 134 eval(loadMoreNews()); 135 }, 136 error: function (error) { 137 138 } 139 }); 140 }); 141 142 //FILTER TOGGLE MOBILE 143 jQuery(".category-title-wrap").on( "click touch", function() { 144 if (Modernizr.mq('(max-width: 768px)')) { 145 jQuery(this).toggleClass('filterOpen'); 146 jQuery(this).next().slideToggle(); 147 } 148 }); 149 150} 151
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.