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

Active accordion bug on window resize #99

Open
maximQa-kgd opened this issue May 13, 2020 · 0 comments
Open

Active accordion bug on window resize #99

maximQa-kgd opened this issue May 13, 2020 · 0 comments

Comments

@maximQa-kgd
Copy link

If you close opened accordion and then resize window, the last active accordion will be opened again and if you try to close it, it will close and then opens. This happens becouse the author remove attribute from tabs
on line 217
$respTabs.find('.resp-accordion-closed').removeAttr('style');

To fix this all you have to do is to check window width, if it's more than the brakpoint when tabs becomes accrodion.
in my case this breakpoint eqauls to 767px, so i check it like this
$(window).on('resize', function () {
if ( $(window).width() > 767 ) {
$respTabs.find('.resp-accordion-closed').removeAttr('style');
}
});

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

No branches or pull requests

1 participant