Interactions : Changing position setting

I think it would be a good thing to change the position setting of an element depending on a trigger.
For instance, I need to put an element on a specific relative position when the page loads, but when scrolling I need that element to follow the scrolling by setting its position to fixed.

Thanks for the feedback @Aminerman. That would be super cool to have and we are thinking of ways to do this maybe by adding a “replace class” or “add class” effect - so it opens up interactions for all css properties.

4 Likes

Hey Sergie, long time, no forum! I’ve been doing research-focused work for close to a year and am just jumping back to Webflow for some prototyping, and looking around to see how old bugs or feature requests are coming along. This topic is old but touches on my current challenge:

“Replace class” in interactions has been on my wish list since pretty much the day that interactions launched - I love using interactions instead of hacking up javascript that is beyond my pay grade. But since they only control a subset of class attributes, I frequently run into situations where I can do 90% of what I need with an interaction, but am locked out of some other attribute, and so can’t use the interaction at all.

So, two questions on the topic:

  1. For you: Is “replace class” or “add class” on the roadmap, and any chance they’ll be coming any time soon?
  2. For the forum: Has anyone set up a custom js snippet as a workaround for this, that basically intercepts an interaction and inserts explicit css changes?

In my current case, I want to change the z-index of the object being affected, to bring it to the foreground. I’m guessing I might not be the first person to want this.

Thanks!

1 Like

@thesergie Could we have an update on the switch class interaction?

Could this be something coming with the interactions 2.0 update??

1 Like

The ability to add/remove classes on the triggers would be pretty amazing. Just sayin’ :wink:

1 Like

Add / remove classes in interactions pretty please!!