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

Refactor the initTabs function #23

Open
2 tasks
einazare opened this issue May 20, 2020 · 0 comments
Open
2 tasks

Refactor the initTabs function #23

einazare opened this issue May 20, 2020 · 0 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@einazare
Copy link
Contributor

einazare commented May 20, 2020

  • When overriding the deafult classes by calling again the initTabs funtion, another event listener will be added for all the tabs, make this only happen for those overriden tabs
  • Change the active classes object, maybe you will have to change normal classes object as well
    The issue is that, the following code:
  let activeElement = ulElement.querySelector("li > a" + queryActiveClasses);

Has errors if the queryActiveClasses is an array with more than one class:
Example:

queryActiveClasses === [".class-1",".class-2"];
// then
"li > a" + queryActiveClasses === "li > a.class-1,.class-2"
// should be
"li > a" + queryActiveClasses === "li > a.class-1.class-2"

Notice the comma.

@einazare einazare created this issue from a note in v1.0 (To do) May 20, 2020
@einazare einazare self-assigned this May 20, 2020
@einazare einazare added the bug Something isn't working label May 20, 2020
@einazare einazare moved this from To do to In progress in v1.0 May 20, 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
Projects
v1.0
  
In progress
Development

No branches or pull requests

1 participant