I struggled a lot with this, and I found out now that it doesn’t work with the newer versions of jQuery. jQuery version 1.4.2 still works, but from version 1.4.3 and higher it doesn’t work any more.
It also doesn’t solve the problem when putting the newer file into the same folder as the other js-files.
When I embed the 1.4.3-plugin in the exercise file from the book, it also doesn’t work any more.
Is something changed in the newer jQuery-versions, and is there a workaround for this? Maybe it’s possible to put a solution in the ‘corrections and typos’-section of this book?
Hi, jQuery 1.5 doesn’t work with me, neither in the exercise file. I tried the googleapi link, and tried to place it in the folder. I checked the file paths and they are okey, connections are fine, when I replace an older file than 1.4.2 it doesn’t work. Have you used the first animated navigation (with the #navigation_blob)? Thanks for your welcome by the way
I just got up to this part of the book, and noticed that the code in the download files is different from the code in the actual book. So I replaced the code in script.js with the code in the book and it works perfectly even with jQuery version 1.5.1. The authors obviously just forgot to update the download files.
EDIT:
Sorry guys, forget this. The code doesn’t work. It only appeared to work because I had a typo (I had navigation_blob instead of navigation-blob in the last section of code). So the hover only worked partially.
The code was relying on calls to animate() to “show” the div - apparently this wasn’t the behavior they intended so they changed it and this broke code which relied on that behavior (which seemed like a side effect anyway.) If you just explicity call show() before you call animate, the code will work as intended (tried it on 1.5.1 and it works as expected.)
Hm, do you mind posting the full script you are using then? Nothing happens for me with JQ5 with the code you posted, but perhaps I don’t use it correctly. Pasted it in where it seemed to belong.
Ah heck, cancel that. I made a file path typo, and the changes do work with jquery 1.5. It’s a little bit flaky, but at least the behavior is essentially as intended. Well done kinakuta.james.