Make sure each canvas has a unique ID assigned to it; for hours and days, use the same scale as for seconds.
Next, you should call the function with the appropriate parameters to draw each canvas separately instead of grouping them all in one function (It's better to create a function that takes a canvas and draws it). I combined everything in one function for efficiency.
(function ($) {
jQuery.fn.countdown = function (options, callback) {
var settings = {
'date': null
};
if (options) {
$.extend(settings, options);
}
this_sel = $(this);
/*Canvas Variables*/
// Define canvas variables here and adjust accordingly
function count_exec() {
// Code logic for countdown execution here
}
// #region Execute Interval
count_exec();
interval = setInterval(count_exec, 1000);
// #endregion
};
})(jQuery);
$(document).ready(function () {
$("#countdown").countdown({
date: "6 january 2017 7:15:00"
},
function () {
$("#countdown").text("merry christmas");
}
);
})
#countdown .countdown-container{
width:25%;
position:relative;
float:left;
border:1px solid #0fd562;
}
#countdown .countdown-container >div{
position:absolute;
top:100px;
left:95px;
text-align:center;
}
.secs, span{
font-size:16px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<div id="countdown">
<div class="countdown-container">
// HTML structure goes here
</div>
<div class="countdown-container">
// Another container
</div>
<div class="countdown-container">
// Container for hours
</div>
<div class="countdown-container">
// Container for days
</div>
</div>
I've set up the formula for days as 365 format (2PI/365=0.0172), but feel free to modify it for weeks or months if needed.
Hope this explanation helps!