Jump to content
Search Community

CSSRulePlugin and CDN

Kota test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello!

 

I wanted to ask if anyone has ever had problems with CDN and CSSRulePlugin??

 

We have a live site, that is working fine. As soon as I enable the CDN I'm getting the error “Uncaught Cannot tween a null target.” The error refers to all pseudo elements that I'm animating with the CSSRulePlugin. When I inspect I can see that the elements are there. My guess was that somehow the JS is loaded before the CSS. If the CDN is disabled, everything works fine though.

 

Any suggestions?

 

Thank you!

Link to comment
Share on other sites

Pulling CCSRulePlugin from the CDN really shouldn't be a problem, but if you are trying to target css rules before the plugin is loaded I suspect that could be a problem. Very hard to diagnose without a live (and reduced) sample. It could be as simple as a single tween on a single rule. 

  • Like 1
Link to comment
Share on other sites

Hi  @Carl,

 

Sorry I didn't clarify. When I mentioned CDN, I meant I'm enabling the CDN on the whole website.

 

I'm including the CSSRulePlugin as a script, not trough the CDN.

 

I will try to replicate the error on the staging site and post the domain here.

 

Thanks in advance

Link to comment
Share on other sites

On 16/02/2018 at 12:02 PM, Dipscom said:

Hey @Kota

 

Welcome to the forums!

 

:-D :-D :-D :-D :-D :-D :-D :-D :-D :-D :-D :-D :-D

 

Have you got a reduced code example we could pick apart?

 

 

 

Hey @Dipscom ! :)))

 

Well I'm trying to figure out a way to duplicate the error on a staging environment, as the website is live, so I don't want to keep it broken while I debug.

 

So I will keep you updated!

Link to comment
Share on other sites

:P

 

I can tell you now, next to no one is going to look at it if you give us a whole live staging site to debug...

 

Throw a Pen together that mimics what you need to achieve with the issue in it. Then, plenty of eyes will flock to your issue.

 

If, for whatever reason, you can't replicate the bug outside then, you got something in your code that's blocking the plugin.

  • Like 1
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...