JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css""></script>
<div class="container">
<div class="middle">WEBSITE LAUNCH COUNTER</div>
<div id="DateCountdown" data-date="2016-05-01 18:40" style="width: 500px; height: 125px; padding: 0px; box-sizing: border-box;"></div>
</div>
CSS
/**
* This element is created inside your target element
* It is used so that your own element will not need to be altered
**/
@font-face {
font-family: vegur;
src: url(vegur.otf);
}
html{
height: 100%;
}
body{
background: url("bg.png");
background-position: bottom;
background-repeat: no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
position: relative;
font-family: vegur !important;
}
.container{
width: 100%;
}
.middle{
margin-top: 65px !Important;
margin: 0 auto;
display: block;
text-align: center;
font-size: 32px;
}
#logo img{
margin: 0 auto;
display: block;
margin-top: 2%;
}
.time_circles {
position: relative;
width: 100%;
height: 100%;
}
#DateCountdown{
display: block;
margin: 0 auto;
}
.container span{
margin: 0 auto;
display: block;
}
.textDiv_Days h4,
.textDiv_Hours h4,
.textDiv_Minutes h4,
.textDiv_Seconds h4{
font-size: 14px !important;
line-height: 9px;
position: absolute !important;
top: 86px;
left: 40px;
font-family: vegur !important;
}
.textDiv_Days span,
.textDiv_Hours span,
.textDiv_Minutes span,
.textDiv_Seconds span{
position: absolute;
top: -52.5px;
left: 10px;
font-size: 48px !important;
font-weight: 300 !important;
line-height: 104px !important;
background-color: #f7f7f7;
height: 103px;
width: 105px !important;
border-radius: 85px;
font-family: vegur !important;
}
/**
* This is all the elements used to house all text used
* in time circles
**/
.time_circles > div {
position: absolute;
text-align: center;
}
/**
* Titles (Days, Hours, etc)
**/
.time_circles > div > h4 {
margin: 0px;
padding: 0px;
text-align: center;
text-transform: uppercase;
font-family: 'Century Gothic', Arial;
}
/**
* Time numbers, ie: 12
**/
.time_circles > div > span {
...
JavaScript
/**
* Basic structure: TC_Class is the public class that is returned upon being called
*
* So, if you do
* var tc = $(".timer").TimeCircles();
*
* tc will contain an instance of the public TimeCircles class. It is important to
* note that TimeCircles is not chained in the conventional way, check the
* documentation for more info on how TimeCircles can be chained.
*
* After being called/created, the public TimerCircles class will then- for each element
* within it's collection, either fetch or create an instance of the private class.
* Each function called upon the public class will be forwarded to each instance
* of the private classes within the relevant element collection
**/
(function($) {
var useWindow = window;
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
if (!Object.keys) {
Object.keys = (function() {
'use strict';
var hasOwnProperty = Object.prototype.hasOwnProperty,
hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'),
dontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
],
dontEnumsLength = dontEnums.length;
return function(obj) {
if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) {
throw new TypeError('Object.keys called on non-object');
}
var result = [], prop, i;
for (prop in obj) {
if (hasOwnProperty.call(obj, prop)) {
result.push(prop);
}
}
if (hasDontEnumBug) {
...