Jquery newbie question

Just got the Jquery Novice to Ninja book and didn’t go past exercise 1. I use xampp where I placed my index.html with the following…

<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8”/>
<title>StarTrackr!</title>

<link rel=“stylesheet” href=“…/…/css/base.css” type=“text/css” media=“screen” charset=“utf-8” />
<script src=“…/…/lib/jquery-1.7.1.min.js” type=“text/javascript” charset=“utf-8”></script>
<script type=“text/javascript” src=“script.js”></script>
</head>

The script.js is…
$(document).ready(function(){
alert(‘Welcome to StarTrackr! Now no longer under police investigation!’);
});

Placed both the html and js under www and when it ran, the js didn’t execute. It pints to the $ of the js script and says “Object expected”

Any idea what I should do to make it run?

Much appreciated.

Hi there,

Welcome to the forums.

You don’t need xampp to run JavaScript (although technically nothing speaks against it).
xampp is a server stack which is useful for server-side technologies, such as PHP.

What happens if you just go into the folder for the first exercise (should be ‘chapter_02\01_document_ready’) and double click on index.html?