Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Load State to TOC Accordion for Delayed or Deferred JS #63

Merged

Conversation

blronaldhuereca
Copy link
Contributor

Fixes #62

This PR introduces a check that checks if the DOM has already been loaded. If it has, it loads the TOC accordion as normal.

If the document hasn't already been loaded, then the DOMContentLoaded event is used to load the TOC.

@mtoensing
Copy link
Owner

Thanks. I need to test this in the coming days. Last time I merged something related to the js code it broke everything. =D

@mtoensing mtoensing merged commit 6cd4ad6 into mtoensing:master Nov 20, 2024
2 checks passed
@blronaldhuereca
Copy link
Contributor Author

@mtoensing thank you. Please let me know if there's any help in testing you need.

We have modified your plugin temporarily, but you can see it working here with our Cookie/script settings implemented: https://www.boundless.com/immigration-resources/marriage-based-green-cards-explained/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Accordion events never triggered due to DOMContentLoaded never being called
2 participants