I am using this bit of code to slide open a div with the content hidden initially. My goal is to have the content fade in after the div slides open…it does, however only on the first opening click. Any other time the fade fails to occur. ANy ideas or help is much appreciated.
<div class="one-third"> <h5>One Third</h5> <p>Seded ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo, nemo enim ipsam voluptatem quia voluptas sit asperna.</p> </div>
<div class="one-third last"> <h5>One Third</h5> <p>Seded ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo, nemo enim ipsam voluptatem quia voluptas sit asperna.</p> </div> </div> </div> <p class="slide"><a href="#" class="btn-slide"></a></p>
The document ready is built into jsFiddle... you can set the select box in the top right corner to "onDomReady" to use document ready, "onLoad" for window load or disable it using the "no wrap".
I am using this bit of code to slide open a div with the content hidden initially. My goal is to have the content fade in after the div slides open…it does, however only on the first opening click. Any other time the fade fails to occur. ANy ideas or help is much appreciated.
Thanks!
Here is the JS…
Here is an example of what I'm referencing:
http://www.formfiftyfive.com/
*click 'What the FFF?'
Thanks Mottie
I tried removing that line. This is what happened:
The content was visible after open, and faded out after close for good. Any other time the drawer opened it was gone.
I actually figured it out. What I did was wrap the "document ready function" around that bit of code…that obviously was causing the issues.
I'm wondering though (forgive me please I am new with JS) why isn't the "document ready" bit needed?
Thanks for all your help/patience.