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

ID generation for accordion fails when there are 10 or more sections #92

Open
fingertipsy opened this issue Jul 16, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@fingertipsy
Copy link

The accordion "show" buttons are not functioning correctly for sections with indices greater than 9.
It seems the IDs for sections with indices greater than 9 are causing conflicts in the HTML. The result is that the "show content" button for section 11 open the content for section 1, 12 opens 2 and so forth.

@jenisayshi
Copy link
Collaborator

think this is caused by this line in the accordian.js code only picking up the last digit of the heading :)

// get z value from name (Map argument)
var level = str.substring(str.length - 1);

@sarahmwong sarahmwong added the bug Something isn't working label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants