skip to Main Content

Html – JS fade between pages doesn't work on Safari

I've put a little JavaScript fadeIn/fadeOut transition between pages from my website: window.transitionToPage = function(href) { document.querySelector('body').style.opacity = 0 setTimeout(function() { window.location.href = href }, 750) } document.addEventListener('DOMContentLoaded', function(event) { document.querySelector('body').style.opacity = 1 }) It simply changes the opacity to…

VIEW QUESTION
Back To Top
Search