Candia countdown

Forte's picture
Forte
Tue, 10/10/2017 - 07:46
#1
Candia countdown

Hi,

I need to know how to set the count down value, i see it is fixed in the js class but i don't know how to give to the script a new value in
each page (dinamically).

Can you show me an exampe about the JS code to use in the pages where i want to set the count down?

Thanks

cindy's picture
cindy
Wed, 10/11/2017 - 06:26

Hi,

Please open file main.js and search and replace function countdown with:

function countdown() {


$('.candia-countdown').each(function() {
var _time = $(this).data('time');


_time = _time ? _time : '2019/10/10';


console.log(_time);


$(this).countdown(_time, function(event) {
var $this = $(this).html(event.strftime(''
+ '<span><strong>%D</strong> <br> days</span> '
+ '<span><strong>%H</strong> <br> hours</span> '
+ '<span><strong>%M</strong> <br> minutes</span> '
+ '<span><strong>%S</strong> <br> seconds</span>'));
});
});
}


Then, in file html, please add (where you want to add countdown) like example below

<div class="candia-countdown color-white mb-150" data-time="2010/10/10"></div>

Also, the right forum should be https://html.megadrupal.com/forum/site-templates/candia

Forte's picture
Forte
Wed, 10/11/2017 - 10:49

thank you for the reply, but i don't have access to that forum.

I had some bug during registration, so i sent an email and i got an account which give me access only to this forum, my account wont log in the html section.

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.