Wrox Programmer Forums
|
BOOK: Beginning JavaScript and CSS Development with jQuery
This is the forum to discuss the Wrox book Beginning JavaScript and CSS Development with jQuery by Richard York; ISBN: 9780470227794
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaScript and CSS Development with jQuery section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 28th, 2009, 03:21 PM
Registered User
 
Join Date: Oct 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Try example from chapter two

For whatever reason, I cannot get the Try example 2.2 from chapter two to work. I gewt the following error in firebug:


$ is not defined
Example%202-2.js()Example%202-2.js (line 94)
error source line: [Break on this error] $(document).ready(tmpExample.ready);

I have tested this by copying your code from the download and it still does not work. Any ideas?

Dave
 
Old October 29th, 2009, 06:00 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

It sounds like you are not linking to the jquery source file correctly. Check your code inlucdes the correct link and that the jquery.js file is in the correct place:

Code:
<script type="text/javascript" src="jquery.js"></script>
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
 
Old October 29th, 2009, 11:39 AM
Registered User
 
Join Date: Oct 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nope .. that's not it. I am used to a lot of include files as I do a lot of PHP stuff. I always keep files like this inside a js folder which is inside an assets folder. I double checked that and the path is correct and I awlways, whenever posssible, use site relative links. I have not had a chance to go back to this but will try again soon. It may be I missed a parenthesis or something.

Dave
 
Old October 29th, 2009, 11:48 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

I downloaded the example code and it ran fine first time btw.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
 
Old October 29th, 2009, 11:49 AM
Registered User
 
Join Date: Oct 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK .. I will try it again. Probably was too tired when trying it and just screwed it up somewhere.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 6 - Code Download Missing for this Chapter dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 11:02 AM
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.