Putting countdown on page

Permalink
I have a javascript-based countdown I want to use on a page.
But the script I need to put on the page gets 'wiped' by c5.

[code]
<script>
var test1 = new Countdown({
year : 2020,
month : 1,
day : 1,
hour : 0,
ampm : "am",
minute : 0,
second : 0 // < - no comma on last item!!
});

</script>
[code]

How can I make it work?

trixiemay
 
WillemAnchor replied on at Permalink Reply
WillemAnchor
wrap it in an onload or ready:

$(document).ready(function () {
//do your thing
}
trixiemay replied on at Permalink Reply
trixiemay
So if I put it in extra header content for the page:

<script>
$(document).ready(function () {
var test1 = new Countdown( {
year : 2020,
month : 1,
day : 1,
hour : 0,
ampm : "am",
minute : 0,
second : 0 // < - no comma on last item!!
});}

</script>

Tried that. Doesn't render anything on the page.
WillemAnchor replied on at Permalink Reply
WillemAnchor
In what file did you put the code ? Did you test it's the right one ?
Is your countdown function writing anything to the screen ? Did you test that?

Add a console.log("test1" + test1) to test if it's being called (or some other testing tool)
jasteele12 replied on at Permalink Reply
jasteele12
Where is your Countdown function?