(function($,window){ jQuery(document).ready(function ($) { //timer const juneTimer = () => { // Set the target date to June 1 const targetDate = new Date('June 1, 2023 00:00:00').getTime(); // Update the countdown every second const countdown = setInterval(() => { // Get the current date and time const currentDate = new Date().getTime(); // Calculate the remaining time in milliseconds const remainingTime = targetDate - currentDate; // Check if the countdown is finished if (remainingTime <= 0) { clearInterval(countdown); console.log("Countdown finished!"); return; } // Calculate the remaining days, hours, minutes, and seconds const days = Math.floor(remainingTime / (1000 * 60 * 60 * 24)); const hours = Math.floor( (remainingTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60) ); const minutes = Math.floor((remainingTime % (1000 * 60 * 60)) / (1000 * 60)); const seconds = Math.floor((remainingTime % (1000 * 60)) / 1000); // Display the countdown const countString = `${days} days, ${hours} hours, ${minutes} minutes, ${seconds} seconds`; $('#june-timer').text(countString); }, 1000); } juneTimer(); }); // document ready }(jQuery,window));

Login

Close
JOIN PSR PLAYBOOK Learn from the best as part of our exclusive Plaintiff Lawyer network.
* Required
Membership is free to access our digital library and live events.