Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery slide content off bottom of page
    text
    copied!<p>I'm trying to figure out how to slide content off the bottom of the page. I have figured out how to get it to scroll down to the bottom of the page but not off. For instance when the image is clicked it should slide off the bottom of the page. The problem is it just pushes the content down. I think I need an <code>overflow:hidden</code> type thing</p> <p>Here is what I have so far.</p> <p><strong>HTML</strong></p> <pre><code>&lt;div id="myGallery"&gt; &lt;img src="https://www.google.com/intl/en_com/images/srpr/logo3w.png"/&gt; &lt;/div&gt; </code></pre> <p><strong>JavaScript</strong></p> <pre><code>$('#myGallery').click(function() { $(this).animate({ top: $(document).height() + 300 }, 1500); return false; }); </code></pre> <p>Fiddle: <a href="http://jsfiddle.net/BandonRandon/wykR7/4/" rel="nofollow">http://jsfiddle.net/BandonRandon/wykR7/4/</a><br> Fiddle fullscreen: <a href="http://jsfiddle.net/BandonRandon/wykR7/4/embedded/result/" rel="nofollow">http://jsfiddle.net/BandonRandon/wykR7/4/embedded/result/</a></p> <p><strong>Edit:</strong> <code>Overflow:hidden</code>to the body only works if the bodies content is not longer than the browser window. See updated fiddle from problem:<br> <a href="http://jsfiddle.net/BandonRandon/wykR7/11/" rel="nofollow">http://jsfiddle.net/BandonRandon/wykR7/11/</a><br> <a href="http://jsfiddle.net/BandonRandon/wykR7/11/embedded/result/" rel="nofollow">http://jsfiddle.net/BandonRandon/wykR7/11/embedded/result/</a> </p> <p>See <a href="http://bandonrandon.com/blog" rel="nofollow">http://bandonrandon.com/blog</a> for exact usage, (click on the girl holding the lights)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload