Countdowns not working

3 replies · opened Jul 10, 2017

JjfoxworthJul 10, 2017

Hi,

My added a countdown and added the appropriate javascript. Something seems wrong here. The countdowns on all of demo pages do not work either. Every countdown registers with zeros only. Playing around in the console shows that the function call to "countdown" returns nothing.

Thanks

JjfoxworthJul 10, 2017

I figured this out. Whenever no format is provided, then there is an error and straight zeros are displayed.

JjfoxworthJul 10, 2017

OK, so there are some other problems. The countdown code won't work at all as is. Changing the date to a string causes it to display something. Add a large number to it, like in the coming soon page causes it to countdown and it appears that what needs to be done is that the date function in each case needs to be changed to something like seconds.

I finally got is to work by doing this instead of the examples ...

<script>
jQuery(document).ready( function($){
var t1 = new Date(2018, 3, 1);
var t2 = new Date();
var dif = t1.getTime() - t2.getTime();
$('#countdownprimary').countdown({until: dif/1000, format: 'OWDHMS'});
console.log($('#countdownprimary').countdown());
});

&lt;/script&gt;
SSemicolon WebSTAFFJul 17, 2017

Hello,

We have just checked this out and the Countdowns appear to be working fine for us with the Default Codes provided. The Demos do not work because the Dates that have added in the Codes expired. Updating them to a later date will definitely work fine.

If you can please provide us with a Live URL of the Issue, we can check it out and provide you with a more assistance for this. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard