jQuery - First Tutorial And I Cant Get It To Work! - Geeks to Go Forums

Jump to content

Log in Register Register Malware removal guide How it works

jQuery - First Tutorial And I Cant Get It To Work!

#1 BARROS

  • Group: Member
  • Posts: 511
  • Joined: 24-February 06

Posted 25 September 2009 - 07:20 PM

Hey,

Just started reading the jQuery Visual Quick Start guide by Peachpit and I have just started the 1st tutorial. My problem is that I can't get it to work...have tried in Firefox, IE and Chrome - not working.
I have included the page for you to download and check. When you click the "Stripe" button on the page, it should chage the 3rd paragraph's background to cyan. This does not happen, even thought the code is the exact same as in the book?!?

Can someone please help as this is stressin me out already! lol

Cheers,

-Lee

Attached File(s)



#2 Major Payne

  • Group: Retired Staff
  • Posts: 5,307
  • Joined: 26-January 05

Posted 25 September 2009 - 11:53 PM

Whatever editor you are using is not coding HTML properly:

Quote

Result: 0 errors / 6 warnings

line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 4 column 2 - Warning: <script> attribute "js�" lacks value
line 4 column 2 - Warning: <script> escaping malformed URI reference
line 17 column 2 - Warning: <style> inserting "type" attribute
line 31 column 1 - Warning: <p> attribute "id" has invalid value "�third�"
line 36 column 1 - Warning: <form> lacks "action" attribute
Info: Document content looks like HTML 4.01 Transitional
Info: No system identifier in emitted doctype


Remove the invalid HTML characters and add a proper document type. If you need a proper HTML Editor link, let me know.

#3 BARROS

  • Group: Member
  • Posts: 511
  • Joined: 24-February 06

Posted 26 September 2009 - 12:49 AM

Hi,

Im using Notepad++, I added in a valid DOCTYPE line at the top of the html page and tried again. Still no luck. Its still throwing up the same errors. See attached picture :)

Cheers,

Attached thumbnail(s)

  • Attached Image: error.jpg


#4 Major Payne

  • Group: Retired Staff
  • Posts: 5,307
  • Joined: 26-January 05

Posted 26 September 2009 - 04:18 AM

Didn't read that list did you? Just adding a doctype is not going to fix the problem. Correcting the illegal HTML characters may not either, but it gets you down to the actual problem. Heck, it might even work after that.

#5 BARROS

  • Group: Member
  • Posts: 511
  • Joined: 24-February 06

Posted 26 September 2009 - 02:50 PM

Tried goin through the list of errors but still no solution. I can't believe the book is telling me to write this code when it doesn't even work!

Just gona leave it and move on to some other books/tutorials. Cheers for your help though!

Share this topic: