My site requires a good amount of javascript for charts, timelines, etc. However, I keep having issues using JS in Zoho Sites. Code works flawlessly with CodePen and JSfiddle, so I don’t believe it is the code. Also, I have tried various snippets and run into the problem every time.
On most occasions I can get the html and css to load. Problem is I can not get the JS to do any animations, etc.
Take this code codepen: https://codepen.io/patrickhill/pen/YXyMVB?editors=1010
The code uses this external script: <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.16.1/TweenMax.min.js"></script>
I have tried the following layouts:
If nothing else, I get this error: [Error] ReferenceError: Can't find variable: TimelineMax
But I also get these:
[Error] Failed to load resource: the server responded with a status of 404 () (bourbon, line 0)
[Error] Refused to execute PATH/TO/js/TweenMax.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] ReferenceError: Can't find variable: TimelineMax
Global Code (year1:8)
[Error] Failed to load resource: the server responded with a status of 404 () (getCurrentPortalUser, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (hummingbird-ui.css.map, line 0)
This is just one code example. Again, I have tried this with a few different codepens prior to forking and modifying just to see if it works (last thing I want to do is spend two days on something that won’t end up working).
What am I doing wrong? Can someone please tell me the correct way to call jQuery and other external code?
Writer is a powerful online word processor, designed for collaborative work.