alabamaseo — 2013-10-08T13:25:00-04:00 — #1
Hello everyone, please forgive my ignorance in regards to JS, it is certainly not my strong suit.
I am trying to install a JS countdown plugin (http://countdownjs.org/) on a blank Wordpress template, but for some reason, I can not get the it to display. I want to start a countdown clock, only counting by days, until March 31, 2014.
I am calling the countdown.js file from my root directory in the <head>, and I have this code where I want the program to generate the result:
var timespan = countdown(start|callback, end|callback, units, max, digits);
countdown( new Date(2013, 3, 31) ).toString();
ts.toHTML() => "<span>5 years</span>, <span>1 month</span>, <span>19 days</span>, <span>12 hours</span>, and <span>17 minutes</span>"
Can someone please help me learn what I am doing wrong?
patche — 2013-10-08T13:27:55-04:00 — #2
alabamaseo — 2013-10-08T13:34:35-04:00 — #3
As far as I can tell, there is no obvious problems. The meta data is pointing to the right .js file, but I am not able to see anything.
Is there anything else that could be causing problems?
Thank you very much for your time and attention
pullo — 2013-10-08T15:09:49-04:00 — #4
Do you have a link to the site you are trying this on?
alabamaseo — 2013-10-08T15:27:54-04:00 — #5
The site is http://TruckerMarketplace.com. The password is "driver88". Thanks for helping me look into it.
pullo — 2013-10-08T15:41:11-04:00 — #6
If you look at the main page in the console, you see:
Uncaught SyntaxError: Unexpected token > truckermarketplace.com/:174
This seems to be caused by this:
ts.toHTML() => "..."
Try changing it to:
ts.toHTML() = "..."
I've got to turn in now (I'm ill), but if that doesn't work, post back here and I'll check back tomorrow.
alabamaseo — 2013-10-08T15:54:36-04:00 — #7
Still having the same problems Nothing is showing up at all.
I hope you feel better Pullo.
alabamaseo — 2013-10-09T08:48:28-04:00 — #8
I was able to make a plugin work for what I needed.
I hope you feel better.
pullo — 2013-10-09T08:51:00-04:00 — #9
Hey, that's cool.
I was just looking at this now, so thanks for letting me know.
What was the problem?
Yeah, a bit better thanks - it is just a cold, so if I sleep more and spend less time at the PC then it should be fine.
Although, that might be easier said that done ...