Streaming live at 10am (PST)

Code to count CMS items breaks navbar dropdown

Hi there,
I’ve having a weird problem: My site’s navbar works fine in general, there’s a dropdown that is opened on hover, like so:

However, I want big numbers for the number of items I have in each category in a Collection List, and when I add a simple script to count these like this…

…the navbar simply won’t open… Any ideas?

Thank you!


In the read only link the dropdown menu actually open, did you mean that it won’t open in the published link?
Uf so, try to republish

Thank you, @shokoaviv. But in the editor it all works, because the custom code added to the page is not running.