🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

The epcounter(endless promotion counter) jQuery plugin lets you create a product discount countdown to show the visitors how much time is left for the discounted price.

countdown timer counter

Documentation

jQuery endless promotion counter

A jQuery plugin for make endless promotion counter

Demo

http://labs.geekhare.me/jquery-epcounter/

Getting started

How to install

Install via NPM:

npm install jquery-epcounter

Install via Bower:

bower install jquery-epcounter

Include files:

<script src="../jquery.js"></script><!-- jQuery is required --> <script src="../dist/jquery.epcounter.min.js"></script>

How to use

Base HTML code:

<div id="epcounter">     <div>An expire: <span id="expireMount"></span> <span id="expireDays"></span></div>     <div>A days left: <span id="daysLeft"></span></div> </div>

Base initializing

$("#epcounter").epcounter({     "idExpireMonth": "expireMount",     "idExpireDays": "expireDays",     "idDaysLeft": "daysLeft" });

Set a start date and amount promotion days

$("#epcounter").epcounter({     "amountPromotionDays": 15,      "startDay": 1,       // Day of month 1 - 31     "startMonth": 8,     // Month 1 - 12,     "startYear": 2018,   // Year,      "idExpireMonth": "expireMount",     "idExpireDays": "expireDays",     "idDaysLeft": "daysLeft" });

Full config with localization

$("#epcounter").epcounter({     "amountPromotionDays": 15,      "startDay": 1,       // Day of month 1 - 31     "startMonth": 8,     // Month 1 - 12,     "startYear": 2018,   // Year,      "idExpireMonth": "expireMount",     "idExpireDays": "expireDays",     "idDaysLeft": "daysLeft",      "monthsList": [         "January",         "February",         "March",         "April",         "May",         "June",         "July",         "August",         "September",         "October",         "November",         "December"     ] });

Debug (print to console)

$("#epcounter").epcounter({     "printLog": true    // Default: false });

Debug result

---------------[ jquery.epcounter.js ]--------------- Start date: Wed Aug 01 2018 00:00:00 GMT+0300 (Moscow Standard Time) Current date: Fri Sep 14 2018 02:59:19 GMT+0300 (Moscow Standard Time) Expire date: Sat Sep 29 2018 02:59:19 GMT+0300 (Moscow Standard Time) Passed days: 45 Days left: 15 ----------------------------------------------------- 

License

MIT © GeekHare


You May Also Like