Dynamic timer text for autowebinars

First you will need to add a countdown so peoples know how much time is left, please note that this step is not actually required by the script and it can work without an actual countdown to.

Click on Edit for your countdown element and set your countdown to Interval and loop so it will count down to each hour.

Create a text element and style it as you would like, add a custom class to this element, for this example i'm gonna use "text_time_holder" in this example:

Add the code snippet below to the head include box in your page settings. Click on Settings, then "Custom Includes" and add the custom code below in it.

<script  type="text/javascript">
var d = new Date();
d.setHours(d.getHours() + 1);
var hr = d.getHours();
var ampm = "am";
if( hr > 12 ) {
    hr -= 12;
    ampm = "pm";
}
$( document ).ready(function() {
 $('.text_time_holder .myclass span').html( 'Join at '+hr +':00'+ ampm + " ");
$('.text_time_holder').attr('style', 'display:block !important;');
});
</script>
<style>
.text_time_holder{
display:none !important;
}
</style>

Please note that you might need to edit the custom class to the one you have set, it is "text_time_holder" in my case.

If you need any help, get in touch at [email protected] and we will be happy to assist.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Create a support ticket Create a support ticket