Jump to content
Search Community

WHY is GSAP overriding my inline style (removing stuff)?

NubieHere test
Moderator Tag

Recommended Posts

Hi, I see that gsap overrides the already applied styles set on the element through markup ( '<div style="yadda yadda"' ... gets overridden ) ... how do I avoid that, and simply have gsap add the properties it needs to work?

 

I set a background-image on the element using the style attribute ... and when doing a gsap.to() ... it removes the background-image element from the style ... that's NOT what I would expect.

Link to comment
Share on other sites

  • NubieHere changed the title to WHY is GSAP overriding my inline style (removing stuff)?

Unfortunately not. It was the simple fact that I hadn’t wrapped the string for the background-image property in url() ... the code was part of a way to complex example to simply pull out. I’ll see if I can find the time to recreate a snippet just to see if that’s redoable. Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...