`; $('#content_masonry').append(articleHtml); }); const observer = lozad('.lozad', { loaded: function (el) { if (!el.classList.contains('lozad')) { el.classList.add('lozad'); } el.style.filter = 'none'; el.style.opacity = '1'; const backgroundImage = el.getAttribute('data-bg-image'); if (backgroundImage) { el.style.backgroundImage = `url(${backgroundImage})`; } if (el.tagName.toLowerCase() === 'img') { } } }); observer.observe(); if (!response.next_page_url) { $('.jl-loadmore-btn-w').hide(); } else { $('#content').append($('.jl-loadmore-btn-w')); } }, error: function () { alert('Error loading more articles.'); } }); }); });