Jump to content


Photo

Chapter 1 Doggon Fade


  • Please log in to reply
No replies to this topic

#1 cjgreen

cjgreen

    New Member

  • Members
  • Pip
  • 3 posts

Posted 16 December 2012 - 07:18 PM

So I get to the end of Chapter 1, and the dog <div> drops down, but the dog is already there - no fade-in effect.
I tend to be prone to type-os, and sometimes insert my own style into the code as its written in the book for these things, so I went back and checked everything.
The ONLY difference between the book code and my code was that I had linked to the latest jQuery library instead of using the downloaded version the book was using. (1.6.2 in the book, 1.8.3 is current as of this post.)
Turns out, the jQuery version makes a difference! For the more recent versions, the <img> has to be hidden before it can be faded in. It no longer suffices to have the <img> embedded in a hidden <div>.
The solution to get the dog fading in properly with the newer jQuery libraries is in the my_style.css file, add:
img { display: none; }
at the bottom, and all will be well.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users