{{ require_js(get_public_template_url("Custom/page/ZOO_Digital_Jan_2017-theme/ZOOsubs_ticker.js")) }} {{ require_js("https://ticker.zoodigital.com/zoosubs_stats.jsonp", "footer") }}
<h2>Built for volume!</h2>
<p>Look how many subtitles and captions we've created and stored securely so far using ZOOsubs.</p>
<h3 id="ZOOsubsTicker">Working...</h3>
We've not changed anything on the page so can't understand why it's behaving differently in the last week or so.
Any ideas what could've caused the error? And how it can be fixed?
first, I wouldn't recommend loading your scripts in the middle of the page. It would be better to use the head of the document, or better yet the footer if possible.
that being said, you have an error in your console that I am sure is related:
Uncaught ReferenceError: ZOOsubs_ticker is not defined
If 'Zoosubs_ticker' was defined and the timer was working, and now it isn't working, something has to have changed. Maybe it wasn't to the page directly. Does your site have a central javascript file? Is it possible someone moved some files around? did you recently upgrade the module containing the code (provided it is in a custom module)?
I get the 'x is not defined' on inline onclick events when I have my function in the javascript section of the custom module interface. I have to place the javascript in my html with <script> tags.
I would suggest trying to revert back to a previous version of the template, not to far back but at least to when you were sure it was working. If it still isn't working then the issue is coming from outside the template from one of the assets attached to the template.
first, I wouldn't recommend loading your scripts in the middle of the page. It would be better to use the head of the document, or better yet the footer if possible.
that being said, you have an error in your console that I am sure is related:
Uncaught ReferenceError: ZOOsubs_ticker is not defined
If 'Zoosubs_ticker' was defined and the timer was working, and now it isn't working, something has to have changed. Maybe it wasn't to the page directly. Does your site have a central javascript file? Is it possible someone moved some files around? did you recently upgrade the module containing the code (provided it is in a custom module)?
I get the 'x is not defined' on inline onclick events when I have my function in the javascript section of the custom module interface. I have to place the javascript in my html with <script> tags.
I would suggest trying to revert back to a previous version of the template, not to far back but at least to when you were sure it was working. If it still isn't working then the issue is coming from outside the template from one of the assets attached to the template.
Thanks for the reply. I'll pass your response over to our dev team to see if they can shed any light.
In terms of reverting back to previous versions, the last revision of the template itself was some time last year. While the associated stylesheet was last edited on the 14/08/18 and the problem only started occuring around 12/09/18.
Sep 20, 20188:12 AM - edited May 31, 20195:12 AM
Key Advisor
Javascript counter stopped working
SOLVE
@JonnyZOO, hmm... it wouldn't be the css in most cases, but the template would have been a likely suspect. What about the javascript files associated with the counter?
Just an update on this, the JavaScript needed linking to the template. I'm guessing this is due to an update in HubSpot's design manager, as I can't remember seeing this option a few weeks back.
Sep 26, 20181:34 PM - edited May 31, 20195:36 AM
Key Advisor
Javascript counter stopped working
SOLVE
That has always been there but I'm glad you found it. I thought it might be. If yours or any of these answers helped please mark them as the solution for others.