08-30-2022 10:47 - edited 08-30-2022 11:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
08-30-2022 10:47 - edited 08-30-2022 11:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi, I'm having a groupElement of lines, planing to have different style attributes for active/passive.
I probably could change their class by having different groupElements for each state and dynamically change the members...
But before I try that approach - is there a directer way like .toggle() or something similar?
Answered! Go to the Best Answer.

Accepted Solutions
08-30-2022 14:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-30-2022 14:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
This may help. Beware inconsistency between 'className' and '.class'.
I think I did some messing around with .class in widget-factory.
Gondwana Software
08-30-2022 13:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-30-2022 13:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
While I don't fully understand, you can change an element's .class at runtime. You could add or remove class names to that string and, in theory, the relevant styles would be displayed.
Gondwana Software

08-30-2022 13:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
08-30-2022 13:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
hmmm... ok. I hoped so, but don't find the syntax. (I never had used classList so far and it doesn't seem to be supported?)
To explain better: I have a couple of lines and want them to have multiple classes (active passive) with different styles.
Then I want to switch the applied class (style) for some elements, but not for all (Instead of having 2 layers for bg and progress using just one )
Unfortunately I can't test in sim. It doesn't seem to take the changes I make

08-30-2022 14:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-30-2022 14:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
This may help. Beware inconsistency between 'className' and '.class'.
I think I did some messing around with .class in widget-factory.
Gondwana Software
08-30-2022 14:12
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
08-30-2022 14:12
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
oh great! yes!! that's exactly what I was looking for 😊
Need to have another look at the factory then... I'm so out of...
