juanjimeneztj/countdown

CountDown version 4.0.0

4.0.0 2021-01-15 00:26 UTC

This package is auto-updated.

Last update: 2024-04-15 07:27:06 UTC


README

CountDown version 4.0.0

Use:

Initialize the div wherever you need the counter with the following lines:

<div id="gswebCountDown"></div>
<script>
    $('#gswebCountDown').gswebCountDown({
        date: "May 23, 2020 23:59:59 GMT-0400"
    });
</script>

Script required

The following lines of code are required to run this plugin:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="../path/gswebCountDown.min.js"></script>

Or you can use this from our server

<script src="https://juanjimeneztj.com/plugins/gswebCountDown4.0.0/gswebCountDown.min.js"></script>

Parameters

We can use parameters in this counter, below you have all the parameters you can use:

Description of all parameters

Parameter Description
theme You have two options in this parameter, the default option and the red one, in the default option you will have a counter with the following example:
687474703a2f2f6a75616e6a696d656e657a746a2e636f6d2f706c7567696e732f6773776562436f756e74446f776e342e302e302f696d616765732f53637265656e73686f745f312e706e67
In the red option you will have a counter with the following example:
687474703a2f2f6a75616e6a696d656e657a746a2e636f6d2f706c7567696e732f6773776562436f756e74446f776e342e302e302f696d616765732f53637265656e73686f745f322e706e67
here is an example:
687474703a2f2f6a75616e6a696d656e657a746a2e636f6d2f706c7567696e732f6773776562436f756e74446f776e342e302e302f696d616765732f53637265656e73686f745f332e706e67
type In this case, 'type' you can receive two additional parameters to the default one that is 'default', it is used for the way you want to receive the values in the counter, you can receive them within a DIV if you pass the parameter type: 'div', or you can receive them inside SPAN tags if you pass the parameter type: 'span'.
lbldays This parameter is to choose if you want the Days to be shown in the counter, if you do not want this parameter to be shown in the counter, only change the value to false.
lblhours This parameter is to choose if you want the Hours to be shown in the counter, if you do not want this parameter to be shown in the counter, only change the value to false.
lblminutes This parameter is to choose if you want the Minutes to be shown in the counter, if you do not want this parameter to be shown in the counter, only change the value to false.
lblseconds This parameter is to choose if you want the Seconds to be shown in the counter, if you do not want this parameter to be shown in the counter, only change the value to false.
labels This parameter is to choose if you want the labels to be shown in the counter, if you do want this parameter to be shown in the counter, only change the value to true.
date This parameter is optional. If you want to use the counter using the date format, you must pass to this parameter 'date' in the following format: date: "May 23, 2020 23:59:59 GMT-0400" . If you want to manually add the days, hours, minutes and seconds to the counter, you can leave the value of 'date' in 'null' and use the parameters below.
days Set this parameter to the days you want to start the counter.
hours Set this parameter to the Hours you want to start the counter.
minutes Set this parameter to the Minutes you want to start the counter.
seconds Set this parameter to the Seconds you want to start the counter.

Default Parameters

Parameter Default Values
theme default
type default
lbldays true
lblhours true
lblminutes true
lblseconds true
labels false
date null
days 0
hours 0
minutes 0
seconds 0