Advertisement
briank

Kartra Visit-Based Countdown Timer

Jun 20th, 2024 (edited)
620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. /*
  3.  * A "footer script" to make Kartra "fixed" countdown timers count a fixed amount of time on each page visit.
  4.  * Author: Brian Katzung (briank@kappacs.com)
  5.  * Version date: 2024-06-20
  6.  */
  7. const counters = $('div.countdown-section[data-countdown="fixed"]').find('div.countdown');
  8. setTimeout(() => counters.each(function () { $(this).stopCountDown(); $(this).countDown({ targetOffset: {
  9. year: 0, month: 0, day: 0, hour: 1, min: 30, sec: 0 // <-- adjust these as desired
  10. }}); }), 1000);
  11. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement