Forum
Using dynamic perch content within a script - issue with timing / page render
We have a fund raising ticker on a page, and we want to make a few values editable via Perch. These values sit inside a script tag in a variable array. We have tried $(document).ready and a few other approaches, but each time the perch content seems to be rendering after the JS so the ticker doesn't work/show. Hardcoding the ticker values works fine.
Any advice on best approach here?
Thanks.
The Perch content is rendered on the server before delivery to the browser. It isn't possible for Perch content to be loaded somehow after all of the other HTML and JavaScript has been.
We can take a look but we'd need to see your code.
Right, so not sure what is happening then, since when we hard code it works and when Perch Content is populated to page in browser it looks exactly the same?
Below doesn't work:
Template is:
Hard coded it works fine:
Any advice much appreciated.
Thanks, Stuart.
OMG.... our fault, the values entered in Perch had a comma in dollar value!!!! $%&#!
So ignore this one, all good.
:-/