Status
working on my site...
Just now
Local Time Display
my time
Chatbox
// Function to create a sparkle at the current mouse position
function createSparkle(event) {
// Create a div element to represent the sparkle
let sparkle = document.createElement('div');
sparkle.classList.add('sparkle');
// Set the sparkle's position relative to the mouse position
sparkle.style.left = `${event.pageX}px`;
sparkle.style.top = `${event.pageY}px`;
// Add the sparkle to the body
document.body.appendChild(sparkle);
// Remove the sparkle after 1 second (match the CSS animation duration)
setTimeout(() => {
sparkle.remove();
}, 1000);
}
// Add an event listener to track mouse movement and create sparkles
document.addEventListener('mousemove', createSparkle);