Whoops,
Sorry.
I think you are looking for something like:
<script>
window.addEventListener('popstate', function(){
jQuery('body').removeClass('page-loaded');
});
window.laytheme.on('newpageshown', function(){
jQuery('body').addClass('page-loaded');
});
</script>
Add this to lay options -> Custom <head> content