End of Page Slide Out Box with jQuery

The other day I was reading an article in the NYTimes and I really liked the box that slides out from the right when you are reading the last part […]

The Collective

🎨✨💻 Stay informed and inspired with our daily selection of the most relevant and engaging frontend and design news.

Pure inspiration and practical insights to keep you ahead of the game.

Check out the latest news

Feedback 33

Comments are closed.
  1. This is really useful – could be used for advertising too. Thanks for this tutorial.

    Keep up the good quality posts; this is a fresh and unique idea, much like the other things you’ve been posting recently using jQuery. Not only are they helpful, but also inspiring. 🙂

  2. @simonjs Thanks a lot, we are glad that you find our posts inspiring! We are planning to post more ideas like these! Cheers, ML

  3. Cool idea, thanks for sharing.

    One key component missing from your example is that the NYT script adds a bottom padding to the body, which is then removed when the slide-out is manually closed.This allows the bottom of the page to be viewed in its entirety. In your demo on a screen width of 1024px there is text at the bottom of the page that can’t be read without manually closing the slide out.

  4. The one flaw I noticed with the demo is if I closed the slide out box, I can’t get it back and lose access to the related content.

    At first glance, it could have been an ad, so it would be nice if there was a way to bring it back if I closed it.

  5. @Josh Thanks a lot for that important observation. I updated the padding of the body, so that the box does not hide the content when the screen is too narrow. When the padding would obstruct the design of the page too much, then a dynamical padding addition in the script would be useful. Thanks again and cheers! ML

  6. @David
    We were actually wondering about that point and decided to really remove the box when the user choses to close it, just like it is done in the NYT script. But you can change that by replacing the line
    $(this).parent().remove();
    with
    $(this).parent().stop(true).animate({'right':'-430px'},100);
    That will simply slide it back to the right, but it will come back whenever you pass by the triggering element again. Hope it helps, ML

  7. Nice idea and effect. This script is very useful for displaying related articles. I like the idea because it make website “wider” by displaying related posts when needed.

  8. really cool, now- how do you block the moronic piece of crap? respectfully a concerned citizen.

  9. I noticed that feature on a NYT article I was reading a few minutes ago, and immediately saw the possibilities for this. So I did a search to see if there was any info on it, and here it all was – nicely laid out. Woot! I’m going to try this for various calls to action – reminding people to subscribe to RSS feed, asking for bookmarks or social sharing, etc. Thanks.

  10. Nice script,but it kind of destroys the lightbox feature as you can see on my web site. The link in the slide out box leads you to the ‘archive’ which still works fine as it doesn’t have include the scripts needed for the slide out box.

    Any suggestions? TIA, Andrew

  11. Thanks alot, Mary! (Gosh, I should have used Google before asking so silly questions .,.)

    Anyhow, I switched to the jquery lightbox version, that means no more conflicts with this slide out box of yours.

    Thanks for all your awesome examples. They rock!

  12. I love you Mary Lous <3 lol … I can use this thing for a lot of stuffs. Is there a donate button?

  13. Very handy effect! I do notice its a little buggy in Opera though (testing version 10.62 on windows). Not sure if this is a bug in Opera itself…

  14. Thank you very much for this simple but awesome stuff! i’ll use Slideout box in my next wp theme.

  15. Thanks for the great tutorial. I am trying to implement this on one of my sites, but am having a problem with some image icons on the page appearing ‘through’ the box.

    Here’s the example page:

    http://www.femaleforum.com/s/article/your_home_maintenance_seasonal_checklists/

    As you can see, the footer appears through the box, as does the discussion bar and share icons.

    Any idea on how this can be fixed?

    Thanks in advance for any help you may be able to offer.

    • Hello Martin, you can give a very high z-index to the #slidebox in the the CSS. simply add this property “z-index: 999;” to the #slidebox and it should always be on top of the other elements (unless there might be some other elements with a higher z-index). If you notice that there are still elements on top of the box, simply increase the z-index. Hope it helps, cheers, ML

  16. Excellent. I went right from the Times to Google to here. Talk about making life easy.

    This is a very nice script. Unobtrusive and could be used for a number of things. As soon as I saw on the Times page, I had to have it. 😉

  17. Hey – love this and it works great. I’m working on trying to customize it a good amount.

    I wanna make the transition vertical, from the top, to kind of drop down on the scroll as a menu. I’ve already had some progress, but am trying to figure out the transition. Would this be hard, any suggestions?

    Cheers & thanks!

  18. Rad! Nevermind – I figured out how to get the basic functionality of what I was trying to do; I just went into the inline JavaScript Snippet and and swapped out ‘right’ for ‘top’. Cool, I’m hoping I just have to dig deeper into the CSS to get my positioning accurate.

    Great resource!

  19. Ahh – I came across a Q. –

    I’m using the feature twice, one at the top of the page, and one at the bottom.

    Some times the features go behind the content, any suggestions on keeping the feature completely on top?

  20. Thank you very much! I have been looking for this kind of tutorial for ages and now only you one helped me! :))))) You are great! 🙂

  21. Hye there, nice tutorial Mary Lou! I’ve been looking for this trick and found your page here. Anyway, one question.

    Instead of using id=”last” to call the slide to appear, is it possible to use the % of total page height?

    What I mean here is after reader scroll after, let say 60% from the page height, the slide come out.

    Practically, when the comments so many, the page height is long. So, by implementing %, I think it is more practical. Thanks. xD

  22. Thanks for this easy to use tutorial! It will be a better idea if the box disappears if the user scrolls upwards. I am using a different plugin on my website amlabc.com, but testing your solution on test.amlabc.com and want to replicate the behaviour which is depicted in the other plugin. Thanks again!