Giter Site home page Giter Site logo

Comments (3)

Twikito avatar Twikito commented on May 22, 2024

Hey @jenstornell ๐Ÿ‘‹

Well, I understand what happens here. When you set data-toggle-is-active on a trigger, I do not toggle but add classes. So here, you will have the two classes flex hidden on the first panel, and so, when you click on another trigger, those two classes are toggled, so removed, and the default display value is kept. Logical.

Actually, that's why I said in the documentation:

In this case, you should add the specified class name on each element, even if the script will check that for you.

In your example, I guess you should only toggle the flex class, so set data-toggle-class-on-target="flex", and it works.

But wellโ€ฆ your example makes me think. Maybe I should really toogle classes instead of adding them for triggers that are active by default.
What do you think?

from easy-toggle-state.

Twikito avatar Twikito commented on May 22, 2024

Hey @jenstornell ๐Ÿ‘‹

I thought about this a little bit longer, and it came to me that since we are now able to toggle as many classes as we want, the adding instead of toggling classes on active by default triggers doesn't make sence anymore.

I will change that behaviour.

from easy-toggle-state.

Twikito avatar Twikito commented on May 22, 2024

Hey @jenstornell ๐Ÿ‘‹

It's now fixed! Using data-toggle-is-active attribute to set a trigger and its targets as active by default will toggle them once on initialization as a consequence.

More information here: https://github.com/Twikito/easy-toggle-state/releases/tag/v1.15.0

from easy-toggle-state.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.