Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Simple Countdown Timer Plugin broken in IE8 WordPress

  • SOLVED

Hello, I'm hoping someone can help me with an error with a plugin displaying in an IE browser.

I have created a site for a client: dgisolarpanels . org .uk

There is a countdown timer plugin in the top right hand corner of the site, in nearly all the browsers it shows perfectly, however in IE8 when it gets down to IE8

A couple of other guys have had the same problem, but the author seems unresponsive at the moment....

http://wordpress.org/support/topic/plugin-simple-countdown-timer-seemes-that-the-seconds-display-has-gone-berzerk


Does anyone know a way that we can fix this to work in IE8?


Thank you

Answers (3)

2011-10-17

Abdessamad Idrissi answers:

will check it out :)


Abdessamad Idrissi comments:

All right ;)
replace the file [[LINK href="http://www.dgisolarpanels.org.uk/wp-content/plugins/simple-countdown-timer/jquery.countdown.min.js"]]jquery.countdown.min.j[[/LINK]] with this modified [[LINK href="http://pastebin.com/z70BiLvq"]] new one[[/LINK]]


Abdessamad Idrissi comments:

You don't need to replace jquery.countdown.js because it is not used. you can even delete it ;)


Ross Gosling comments:

Thank you, I have replaced the file, however I can not check to see if it works until tomorrow when I can get access to a PC that has IE8, i'm on a mac now.

If you have access to a PC that has IE8, can you tell me if it is working?

Thanks


Ross Gosling comments:

It should be 134 days....


Abdessamad Idrissi comments:

I tested the script in ie9 and ie8 before uploading it ;)

by the way, I checked your website and I see that you didn't update the [[LINK href="http://www.dgisolarpanels.org.uk/wp-content/plugins/simple-countdown-timer/jquery.countdown.min.js"]] jquery.countdown.min.js[[/LINK]] with the new one yet.


Ross Gosling comments:

Thank you for your help however the countdown now counts down from 100 seconds?! on all browsers, Firefox, Safari


Ross Gosling comments:

I have found this countdown timer and found that it works in IE7, it also counts down from 60 seconds not 100, could we use the js from this?

[[LINK href="http://www.popcorndesign.co.uk/clients/sites/dgisolar/wp-content/themes/news/flip.html"]][[/LINK]]


Ross Gosling comments:

Or can you embed that countdown timer in the header of my wordpress site for me?

I can supply FTP details : )


Abdessamad Idrissi comments:

Please send me the FTP details or/and admin account to the dashboard in a private message so that I can upload the working example.

I tested it in my local host before answering.

have a good day :)

2011-10-17

Romel Apuya answers:

add some height


.sct_count,#cnt_0,
#cnt_1,#cnt_2,
#cnt_3,#cnt_4,
#cnt_5,#cnt_6,
#cnt_7,#cnt_8,
#cnt_10,#cnt_11{
height:50px !important;
}

2011-10-17

Linda answers:

Hi there, try replacing the jquery.countdown.js with this new one. I don't think I can attach a file so I'll just put the code below for the whole file.

/*
* jquery-counter plugin
*
* Copyright (c) 2009 Martin Conte Mac Donell <[email protected]>
* Dual licensed under the MIT and GPL licenses.
*
* http://docs.jquery.com/License
*/

jQuery.fn.countdown = function(userOptions)
{
// Default options
var options = {
stepTime: 60,
// startTime and format MUST follow the same format.
// also you cannot specify a format unordered (e.g. hh:ss:mm is wrong)
format: "dd:hh:mm:ss",
startTime: "01:12:32:55",
digitImages: 6,
digitWidth: 53,
digitHeight: 77,
timerEnd: function(){},
image: "digits.png"
};
var digits = [], interval;

// Draw digits in given container
var createDigits = function(where)
{
var c = 0;
var tempStartTime = options.startTime;
// Iterate each startTime digit, if it is not a digit
// we'll asume that it's a separator
for (var i = 0; i < options.startTime.length; i++)
{
if (parseInt(tempStartTime.charAt(i)) >= 0)
{
elem = jQuery('<div id="cnt_' + i + '" class="cntDigit" />').css({
height: options.digitHeight * options.digitImages * 10,
float: 'left', background: 'url(\'' + options.image + '\')',
width: options.digitWidth});
digits.push(elem);
margin(c, -((parseInt(tempStartTime.charAt(i)) * options.digitHeight *
options.digitImages)));
digits[c].__max = 9;
// Add max digits, for example, first digit of minutes (mm) has
// a max of 5. Conditional max is used when the left digit has reach
// the max. For example second "hours" digit has a conditional max of 4
switch (options.format.charAt(i)) {
case 'h':
digits[c].__max = (c % 2 == 0) ? 2: 9;
if (c % 2 != 0)
digits[c].__condmax = 3;
break;
case 'd':
digits[c].__max = 9;
break;
case 'm':
case 's':
digits[c].__max = (c % 2 == 0) ? 5: 9;
}
++c;
}
else
elem = jQuery('<div class="cntSeparator"/>').css({float: 'left'})
.text(tempStartTime.charAt(i));

where.append('<div>');
where.append(elem);
where.append('</div>');
}
};

// Set or get element margin
var margin = function(elem, val)
{
if (val !== undefined)
return digits[elem].css({'marginTop': val + 'px'});

return parseInt(digits[elem].css('marginTop').replace('px', ''));
};

// Makes the movement. This is done by "digitImages" steps.
var moveStep = function(elem)
{
digits[elem]._digitInitial = -(digits[elem].__max * options.digitHeight * options.digitImages);
return function _move() {
mtop = margin(elem) + options.digitHeight;
if (mtop == options.digitHeight) {
margin(elem, digits[elem]._digitInitial);
if (elem > 0) moveStep(elem - 1)();
else
{
clearInterval(interval);
for (var i=0; i < digits.length; i++) margin(i, 0);
options.timerEnd();
return;
}
if ((elem > 0) && (digits[elem].__condmax !== undefined) &&
(digits[elem - 1]._digitInitial == margin(elem - 1)))
margin(elem, -(digits[elem].__condmax * options.digitHeight * options.digitImages));
return;
}

margin(elem, mtop);
if (margin(elem) / options.digitHeight % options.digitImages != 0)
setTimeout(_move, options.stepTime);

if (mtop == 0) digits[elem].__ismax = true;
}
};

jQuery.extend(options, userOptions);
this.css({height: options.digitHeight, overflow: 'hidden'});
createDigits(this);
interval = setInterval(moveStep(digits.length - 1), 1000);
};