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?
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?
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.
<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.
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)
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)
Where is your Countdown function?
$(document).ready(function () {
//do your thing
}