...

View Full Version : Jquery Error: $ is not defined



apt213
09-03-2010, 04:46 PM
Greetings all. Please let me apologize in advance if this is a tremendously stupid question, but I'm new to Jquery and ASP... and I'm suddenly building an entire site made of both. *sigh*

I keep getting an error message in Firebug in relation to the accordion menu I created. "$ not defined $(function() {"

If the navigation is isolated on its own page, the error does not exist. It only occurs once it is brought into the Store Master page.

Working Version: http://www.stephenjosephinc.com/testing/
Non-Working Version: http://74.124.26.78/

The following code is cut from the head in the non-functional page:



<head id="ctl00_Head1">
<title>Shop Online</title>

<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="icon" href="App_Master/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="App_Master/favicon.ico" type="image/x-icon" />
<link type="text/css" href="App_Master/css/custom-theme/jquery-ui-1.8.4.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.4.custom.min.js"></script>
<link type="text/css" href="App_Master/theme/ui.all.css" media="screen" rel="stylesheet" />

<script type="text/javascript">
$(function() {
$("#accordion").accordion({
collapsible: true,
autoHeight: false,
header: "h3"}
);
});
</script>

<link href="App_Themes/DefaultTheme/master.css" type="text/css" rel="stylesheet" />
<link href="App_Themes/DefaultTheme/menu.css" type="text/css" rel="stylesheet" />
</head>


If it helps at all, you may view the entire code here: http://74.124.26.78/full_code.txt

Please note: I DID NOT create the code on the aforementioned page. It's an ugly, nightmarish mess (at least to my non-ASP-loving eyes), so please don't hate me for bad form in the body code. The only code that I wrote for this page is the bit you see above and the hrefs for the side nav.

Any help would be massively appreciated! Thank you in advance!

apt213
09-03-2010, 04:55 PM
For reasons I cannot begin to comprehend, in the time I was writing that OP, the error stopped getting flagged in Firebug- HOWEVER, the accordion menu is still not working, so clearly, something is wrong somewhere.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum