Skip to main content

Bug Tracker

Side navigation

#1159 closed bug (worksforme)

Opened May 03, 2007 09:06PM UTC

Closed May 05, 2007 05:26PM UTC

Last modified June 19, 2007 10:09AM UTC

It just doesn't work

Reported by: whocares Owned by:
Priority: undecided Milestone: 1.1.3
Component: ajax Version: 1.1.2
Keywords: Cc:
Blocked by: Blocking:
Description

Downloaded compress and uncompressed version. Tried the first step of the tutorial with both FireFox and IE 6.0, and nothing happened.

Here's the code:

<html>

<head>

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

<script type="text/javascript">

$("a").click(function(){

alert("Thanks for visiting!");

});

</script>

</head>

<body>

<a href="http://jquery.com/">jQuery</a>

</body>

</html>

Attachments (0)
Change History (2)

Changed May 04, 2007 12:40AM UTC by aheimlich comment:1

Try this:

$(document).ready(function() {

$("a").click(function(){

alert("Thanks for visiting!");

});

});

See http://docs.jquery.com/Tutorials:Introducing_%24%28document%29.ready%28%29

Changed May 05, 2007 05:26PM UTC by john comment:2

resolution: → worksforme
status: newclosed

Correct - be sure to use document ready.