Skip to main content

Bug Tracker

Side navigation

#12842 closed bug (notabug)

Opened November 03, 2012 04:53PM UTC

Closed November 04, 2012 06:20PM UTC

Incorrect information in jQuery: The Basics tutorial example

Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:

In the section - Complete Example - the follow sentance should refer to <body> instead of <head>.

Also, while the custom script is included in the <head>, it is generally preferable to place it in a separate file and refer that file with the script element's src attribute

<!DOCTYPE html>

<html lang="en">


<meta charset="utf-8">

<title>jQuery demo</title>



<a href="">jQuery</a>

<script src=""></script>




alert("As you can see, the link no longer took you to");







Attachments (0)
Change History (3)

Changed November 04, 2012 06:07PM UTC by gu_ludo comment:1

I think that is not a bug.

You've called Event.preventDefault() method, so it was expected to the link not working anymore.

Changed November 04, 2012 06:12PM UTC by gu_ludo comment:2

I want to apologize, now I got what you mean. But, anyways, I think this subject isn't supposed to be discussed here.. :)

Changed November 04, 2012 06:20PM UTC by mikesherov comment:3

resolution: → notabug
status: newclosed

Thanks for contributing a bug report. All of the tutorials should be considered out of date. If you have a bug in to report, please go here: http://github/com/jquery/