Jquery - Linking external .js file not working

一笑奈何 提交于 2019-12-01 09:16:16

Problem 1

It looks like jquery.js contains the code you wrote that depends on jQuery.

You need to load jQuery before you try to use it.

Swap the order of the <script> elements.


Problem 2

$("document") will wait for <document> elements to be ready. HTML doesn't have such a thing. Lose the quotes to pass in the document object directly.

Better yet, forget about the explicit call to ready and just

jQuery(function () { /* your function */ });
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!