Skip to content

Commit

Permalink
refactor: add time to fade in
Browse files Browse the repository at this point in the history
  • Loading branch information
geospackle authored Jan 3, 2024
1 parent 98a2f68 commit 47d38a4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@

<script src="https://code.jquery.com/jquery-1.8.3.min.js" type="text/JavaScript"></script>
<script>
// Function to fade the page into white

function fadeIntoWhite() {
var fadeContainer = document.getElementById('fadeContainer');
fadeContainer.style.opacity = '1';
document.body.style.overflow = 'hidden'; // Optional: Disable scrolling during the fade
document.body.style.overflow = 'hidden'; // disable scrolling during the fade
}

// Call the function after a certain delay or on some event
setTimeout(fadeIntoWhite, 5500); // Example: fade after 2 seconds
setTimeout(fadeIntoWhite, 6500);
</script>
<script type="text/javascript">
function delayer(){
Expand All @@ -64,7 +63,7 @@
</script>

</head>
<body onLoad="setTimeout('delayer()', 7000)">
<body onLoad="setTimeout('delayer()', 8000)">


<div id="fadeContainer"></div>
Expand Down

0 comments on commit 47d38a4

Please sign in to comment.