I cant export properly something from codepen

Hi everyone, I found a ready pen, I took it and exported it. But when I open the index file the animation does not play, why is that and how can I fix it?
Here is the pen: https://codepen.io/mudrenok/pen/XMobMa

What do you mean? Im opening the file by unarchiving it by the zip and then opening the index.html

When I export it and run the html file, I see this in the console:

GET file://cdn.jsdelivr.net/mojs/latest/mo.min.js net::ERR_INVALID_URL
script.js:2 Uncaught ReferenceError: mojs is not defined
at script.js:2:21

In the network tab I see that it is failing.

In the code is this:

  <script src='//cdn.jsdelivr.net/mojs/latest/mo.min.js'></script>

Searching online I found this site that offers this url:

https://cdnjs.cloudflare.com/ajax/libs/mo-js/1.4.0/mo.umd.min.js

When I sub that in, it works.

1 Like

Yeah, I guess just adding the https: would work, too.

Yeah both of these works just fine. Thank you all so much

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.