The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> countdown timer issue
Meto2k
post Nov 12 2020, 07:13 PM
Post #1





Group: Members
Posts: 6
Joined: 12-November 20
Member No.: 27,633



Hi all,

I am building my own website ( very beginner so allready sorry ) but I encountered a problem with a ready to use time counter.

the code is as follow

<div class="date_countdown">
<div id="timer">
<div id="days" class="date"></div>
<div id="hours" class="date"></div>
<div id="minutes" class="date"></div>
<div id="seconds" class="date"></div>
</div>

it shows
DAYS
-413
HOURS
11
MINUTES
43
SECONDS
51

and it is still counting down... My question here is how can I edit the time? whatever I try didnt work
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Christian J
post Nov 12 2020, 08:47 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



According to https://github.com/sonnyt/downCount it seems you need to change the null values here:

CODE
$.fn.downCount = function (options, callback) {
var settings = $.extend({
date: null,
offset: null
}, options);

to (for example) this:

CODE
$('.countdown').downCount({
    date: '08/27/2013 12:00:00',
    offset: -5
}, function () {
    alert('WOOT WOOT, done!');
});


EDIT: or am I looking at the same script? Not familiar with Github's layout. unsure.gif

This post has been edited by Christian J: Nov 13 2020, 08:07 AM
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Meto2k
post Nov 13 2020, 09:00 AM
Post #3





Group: Members
Posts: 6
Joined: 12-November 20
Member No.: 27,633



QUOTE(Christian J @ Nov 12 2020, 08:47 PM) *

According to https://github.com/sonnyt/downCount it seems you need to change the null values here:

CODE
$.fn.downCount = function (options, callback) {
var settings = $.extend({
date: null,
offset: null
}, options);

to (for example) this:

CODE
$('.countdown').downCount({
    date: '08/27/2013 12:00:00',
    offset: -5
}, function () {
    alert('WOOT WOOT, done!');
});


EDIT: or am I looking at the same script? Not familiar with Github's layout. unsure.gif



=D thank you for the fast replies ! but the counter is not changing... still the same countdown as in the picture. I tried all available options but I think there may be a malfuntion somewhere.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 13 2020, 11:42 AM
Post #4


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(Meto2k @ Nov 13 2020, 03:00 PM) *

still the same countdown as in the picture.

The picture looks like if the target date expired 413 days ago. Have you set a target date, and is it correct?

In any case there should be plenty of other countdown timers on the web that you could use instead.
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th April 2024 - 06:26 AM