Цитата
Почему приходится все время ждать помощи по нескольку часов/дней???
На данном форуме вы находитесь не одни, и другим пользователям так же как и вам необходима помощь. На нашей платформе техническая поддержка оказывается бесплатно, вы не платите за техническую поддержку как и другие пользователи. Модераторы вам пытаются помочь как можно чаще и лучше, а так же по мере своих возможностей.
Цитата
Что нужно чтобы ускорить этот процесс?
Обратитесь в любую платную дизайн студию где вам сделают дазайн по вашему заказу.
По вашему вопросу:
Удалите подключение файла "jquery.min.js" в шаблоне "HTML". Добавьте в ваш шаблон "HTML" после <div id="content">
<span id="clockJS"></span>
Далее в файл main.js добавьте
jQuery.cookie = function(name, value, options) {
if (typeof value != 'undefined') { // name and value given, set cookie
options = options || {};
if (value === null) {
value = '';
options = $.extend({}, options); // clone object since it's unexpected behavior if the expired property were changed
options.expires = -1;
}
var expires = '';
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
var date;
if (typeof options.expires == 'number') {
date = new Date();
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
} else {
date = options.expires;
}
expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
}
// NOTE Needed to parenthesize options.path and options.domain
// in the following expressions, otherwise they evaluate to undefined
// in the packed version for some reason...
var path = options.path ? '; path=' + (options.path) : '';
var domain = options.domain ? '; domain=' + (options.domain) : '';
var secure = options.secure ? '; secure' : '';
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
} else { // only name given, get cookie
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) == (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
}
};
function calcage(secs, num1, num2) {
s = ((Math.floor(secs/num1))%num2).toString();
if (LeadingZero && s.length < 2)
s = "0" + s;
return s;
}
function CountBack(secs) {
if (secs < 100) {
var new_date = new Date();
$.cookie('target_date', new_date.setDate(new_date.getDate() + 3));
//document.getElementById("clockJS").innerHTML = FinishMessage;
return;
}
DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000));
DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs,3600,24));
DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs,60,60));
DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60));
document.getElementById("clockJS").innerHTML = DisplayStr;
if (CountActive)
setTimeout("CountBack(" + (secs+CountStepper) + ")", SetTimeOutPeriod);
}
$(function(){
if($.cookie('target_date').length) {
TargetDate = $.cookie('target_date');
}
else {
TargetDate = new Date();
$.cookie('target_date', TargetDate);
}
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "<span class='countdown_schet'>%%D%%:%%H%%:%%M%%:%%S%%</span>";
FinishMessage = "Time's Up";
CountStepper = Math.ceil(CountStepper);
if (CountStepper == 0)
CountActive = false;
var SetTimeOutPeriod = (Math.abs(CountStepper)-1)*1000 + 990;
var dthen = new Date(TargetDate);
var dnow = new Date();
if(CountStepper>0)
ddiff = new Date(dnow-dthen);
else
ddiff = new Date(dthen-dnow);
gsecs = Math.floor(ddiff.valueOf()/1000);
CountBack(gsecs);
});
далее в файл стилей main.css добавьте
#clockJS {
height: 40px;
position: absolute;
right: 255px;
top: 360px;
width: 200px;
}