简体   繁体   English

jQuery在站点或本地上不起作用,但可以在jsfiddle中使用

[英]JQuery not working on site or locally but works in jsfiddle

JQuery is not running on my site or locally. JQuery不在我的网站或本地上运行。 Here is my site: http://michigangurudwara.com/pclass/ 这是我的网站: http : //michigangurudwara.com/pclass/

I'm simply testing out JQuery by trying out the show/hide functions. 我只是通过尝试显示/隐藏功能来测试JQuery。 When you hover over "Test", more text should drop down underneath it. 当您将鼠标悬停在“测试”上时,更多的文本应在其下方放下。 Here is what I'm trying to accomplish: http://jsfiddle.net/nGY6K/2/ 这是我要完成的工作: http : //jsfiddle.net/nGY6K/2/

Anyone know why it's not working? 有人知道为什么它不起作用吗?

<link langauge="javascript" type="text/javascript" href="jquery.js" />

This is not the way to load scripts. 这不是加载脚本的方法。

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

This is the way to load scripts. 这是加载脚本的方式。 (edited to make it more sensible) (进行编辑以使其更明智)

You are not linking to jQuery correctly. 您没有正确链接到jQuery。

Change this: 更改此:

<link langauge="javascript" type="text/javascript" href="jquery.js" />

to this: 对此:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM