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

Close accordion by clicking element outside the questionClass? #14

Closed
dubfonik opened this issue Sep 5, 2020 · 2 comments
Closed

Close accordion by clicking element outside the questionClass? #14

dubfonik opened this issue Sep 5, 2020 · 2 comments
Labels
bug Something isn't working question Further information is requested

Comments

@dubfonik
Copy link

dubfonik commented Sep 5, 2020

I have an element inside the answerClass (an "X") which, when clicked, I would like to close that accordion. Is this possible?

I am getting an error in console accordion.min.js?ver=2.8.0:9 Uncaught TypeError: t.className.match is not a function when clicking this element after applying the targetClass

@dubfonik
Copy link
Author

dubfonik commented Sep 5, 2020

Actually I found out the issue: I was trying to use an SVG which didn't seem to receive the click event. Using a PNG instead is fine but it would be good to allow SVG to take this click event

@michu2k michu2k added bug Something isn't working question Further information is requested labels Sep 8, 2020
@michu2k
Copy link
Owner

michu2k commented Nov 11, 2020

Hi @dubfonik
In the new version (3.0.0) you can use .close(idx) method.

@michu2k michu2k closed this as completed Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants