Streaming live at 10am (PST)

Change Class Name Without Creating New Element


#1

Hey there, I am wondering if there is a way to change the class name for an element on a different break point without having to recreate the element.

For example, there are some elements that have animations on them, I don't want these animations running on my mobile layout as there causes issues, is there a way to change the class name for lets ay my header but only change the class for the mobile version of that header while keeping the desktop version the same?

Presumably without having to hide the element on the mobile layout and recreating a new version?

I did a quick search in the forums and couldn't find a similar question so I apologies if this has already been asked.

Thank you in advance!


#2

there isn't away to do this currently.

The common technique is to duplicate the elements without the interaction.

From my understanding you would need to use JS to remove the class on a particular viewport.


#3

Hey thanks so much for the reply @AlexN. Sounds good, just curious to see if there was an easier way than what I was doing lol.


#4

This topic was automatically closed after 60 days. New replies are no longer allowed.