Hello, this is a continuation of a previous question I had.
I am trying to have a modal display as open if the user has not been to the site before.
I have built the modal as a component and have added it to the header of the page.
In the custom JS for the header I have added some code to trigger a click event on the modal toggle listening for DOMContentLoaded, however it doesn’t seem to trigger the toggle. I’ve put in a few console.log statements in the function and it SEEMS to be working its way through correctly, but the modal isn’t opening? I’m wondering is there some other event I need to listen to or something like that, perhaps cornerstone loads in certain components later or something?
I would appreciate if someone could have a quick look for me at this, it has to be something simple I am doing wrong.
The component is called Localisation Modal in Cornerstone and the JS to trigger it is in the header in Cornerstone. I would really appreciate any input on this as I’ve been banging my head against the wall here for the last day with this.
I am attaching admin credentials in the secure note below. Thanks in advance!