Skip to content

Refactor the initTabs function #23

Description

@einazare
  • 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.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions