Jump to content
Search Community

ntsm-David

nThenSome test
Moderator Tag

Recommended Posts

Thanks for your reply.

I have placed it at the bottom of my html page.

 

<script src=https://cdnjs.cloudflare.com/ajax/libs/gsap/3.2.6/gsap.min.js></script>
    <script src="JS/textAni.js"></script> 

</body>

</html>

Link to comment
Share on other sites

I am guessing a syntax/format issue somewhere, then.

When I pull your animation into single html file to my server it comes up OK.

 

Your server settings may be more strict than CodePen or Brackets where some mistakes may simply be ignored.

Link to comment
Share on other sites

I see you are missing quotes around your src for the gsap library in this post...

 

19 minutes ago, nThenSome said:

I have placed it at the bottom of my html page.

 

<script src=https://cdnjs.cloudflare.com/ajax/libs/gsap/3.2.6/gsap.min.js></script>
    <script src="JS/textAni.js"></script> 

 

Link to comment
Share on other sites

I wonder if it is finding your .js file...

You might try troubleshooting that by dropping a script tag in your html file within the body tag.

 

    <script>
gsap.from("#title, #musicStyles, #aside", {opacity:0, scale:3, duration:1, stagger: .75, ease:"power2"});
    </script>

 

Link to comment
Share on other sites

@nThenSome can you provide the URL of your page that's not working? It's just super difficult to troubleshoot blind. Or did I miss a link that you provided somewhere?

 

You've got the same HTML markup in the live site too, right? I have absolutely no idea about server-side stuff, but maybe it's a MIME type setting, like if the server is sending the JavaScript file(s) as an unexpected type? Totally stabbing in the dark. 

  • Like 1
Link to comment
Share on other sites

Thanks everyone for your help and advice. The issue is resolved. I tried Greg's advice and put the script in the body tag, animation worked. Then I deleted and relinked the external js script and all is well. Thanks again for all your support.

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