Thanks for checking. The errors are theme file errors and not my code errors. The code is just HTML and there is no JS. Also, the errors in question show up on that page when I am logged in as well and the accordion works just fine. No plug-ins are interfering with this after testing. Again, this is just HTML code that uses bootstrap library. Nothing complex there at all.
I have a demo in a few days and really need to sort it out. I understand if this was not working at all but it does work except when visited publicly. For things that have JS or do not need to be changes often I can resolve this issue by putting the code in a functions but this this its not possible.
Been using X theme for years and you used to provide accordion element in the past but since its no longer available I was forced to use my own accordion.