Count up ticker - what's wrong with this code?

I am getting stuck with some custom javascript. Probably too much to expect anyone here to rescue me, but thought i would try!

I am trying to add a ticker to my site, and found this code that does what i want: Edit fiddle - JSFiddle - Code Playground

However, it doesn’t work when i insert a code box and add the HTML to the first box and the JS to its box.

It seems like the name bit isn’t calling up the right thing…

Any ideas?!

because jQuery dependency. Your page may not has jQuery loaded.

Just copy the JS code from Fiddle, paste to Chatgpt, ask to convert to vanilla JS, then copy it and paste in to your Code Element JS section.

1 Like

Thank you soooo much! Your taking the time to share your knowledge has made my impossible happen!!!

Love the combo of a person and ChatGPT - which hadn’t occurred to me. (Assuming you are indeed a person.)

Assuming @bricksonemore is right about the issue being jQuery, please note that jQuery in WordPress is in compatibility mode. You can get around that by replacing $ with jQuery in the code. Or just ask chatGPT to adjust the code to work in compatibility mode.

FYI jQuery being in compatibility mode is a WordPress thing, not a Bricks thing. In case you run into this elsewhere in WordPress.