0

JQuery is not running on my site or locally. Here is my site: http://michigangurudwara.com/pclass/

I'm simply testing out JQuery by trying out the show/hide functions. 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/

Anyone know why it's not working?

gsingh2011
  • 11,632
  • 22
  • 95
  • 144

2 Answers2

3
<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)

Amadan
  • 179,482
  • 20
  • 216
  • 275
  • This syntax will give you a lot of headaches: http://stackoverflow.com/questions/69913/why-dont-self-closing-script-tags-work – Joseph Silber Dec 21 '11 at 06:01
  • 1
    Also, "language" is spelt wrong, and that attribute is not necessary any more (it [has been deprecated](http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.1)). – GregL Dec 21 '11 at 06:03
  • True - didn't even notice that. And since it's optional, nothing complained. Edited. – Amadan Dec 21 '11 at 06:07
  • @GregL - He's using the xHTML doctype. – Joseph Silber Dec 21 '11 at 06:07
  • @JosephSilber: Still, `type` is the only required attribute. – Amadan Dec 21 '11 at 06:08
  • Until Google succeeds in getting cross-browser support for Dart (I really hope they don't). – Joseph Silber Dec 21 '11 at 06:11
  • @JosephSilber: If so, it will have its own mimetype, and no implementing browser would be silly enough to execute `text/javascript` as Dart code. `type` is enough. – Amadan Dec 21 '11 at 06:13
  • 1
    @gsingh2011 Because I think a lot of browsers assume that the contents of a ` – GregL Dec 21 '11 at 06:33
3

You are not linking to jQuery correctly.

Change this:

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

to this:

<script language="javascript" type="text/javascript" src="jquery.js"></script>
Joseph Silber
  • 205,539
  • 55
  • 352
  • 286