Avoca - jquery on page load

PHOTO EMBED

Mon Sep 12 2022 15:04:43 GMT+0000 (UTC)

Saved by @hollyhenaghan #undefined

<script src="https://code.jquery.com/jquery-3.5.0.min.js"></script>
<script>

$(window).bind('hashchange', function() {
     //code
    console.log('Page has changed')
    startObserving()


});

let observer = new MutationObserver(function (mutations, me) {
$(".lazyload-wrapper").find('img.fd-image').each(function(){
$(this).attr('srcset', $(this).attr('srcset').replace(/jpg(.)+/,'jpg'));
});
})

function startObserving() {
console.log('Starting Observing')
observer.observe(document, {
    childList: true,
    subtree: true,
})
}
startObserving()

</script>
content_copyCOPY