Javascript not running on github, but runs on local machine

时间:2019-03-05 16:39:57

标签: javascript github github-pages

I uploaded a project page on Github, but the page is not executing the javascript that works properly on a local machine.

Link to my github: https://lydiatest.github.io/

The sidebar menu and the header should carry the effect as of below:

https://codepen.io/mrReiha/pen/

All javascripts are located in the file index.js:

https://lydiatest.github.io/dats6401/js/index.js

 <script src="js/index.js" type="text/javascript"></script>

Thank you for any help!

1 个答案:

答案 0 :(得分:1)

问题与您的脚本无关。 jquery not getting loadedhttp一起使用,是因为从https而非{{1}}提供了网址。

您的脚本取决于jquery(下载失败),因此无法运行。您可以检查浏览器的控制台以获取更多详细信息。

http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js更新为https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js,它应该可以正常工作。

希望有帮助。如有任何疑问,请回复。