jQuery(document).ready(function () {
function reduceOpacityOverTime() {
// Set the target opacity (0 for fully transparent)
var targetOpacity = 0;// Set the duration for the transition (in milliseconds)
var duration = 2 * 1000; // 24 hours 24 * 60 * 60 * 1000;// Calculate the interval time
var intervalTime = 10; // milliseconds
var steps = duration / intervalTime;// Calculate the step size for each interval
var stepSize = 1 / steps;// Function to update the opacity at regular intervals
function updateOpacity() {
var currentOpacity = parseFloat($('body').css('opacity'));
var newOpacity = Math.max(currentOpacity - stepSize, targetOpacity);
jQuery('body').css('opacity', newOpacity);// Stop when the target opacity is reached
}// Set the interval for updating the opacity
var opacityInterval = setInterval(updateOpacity, intervalTime);
}// Call the function when the document is ready
reduceOpacityOverTime();
});