Simple ways to implement infinite scrolling on your website

Wdd Logo.
September 17, 2014
Simple ways to implement infinite scrolling on your website.

Infinite scrolling embodies one of the ideal attributes of any good design: people can use it without thinking about it.

Once you’ve encountered it a couple of times, you forget about it. I’d say that most of us have come to expect certain applications, or perhaps certain kinds of applications, to simply load more content when we hit the bottom of a page. And why not? It’s effective, and often convenient.

In some contexts, constantly clicking to see successive pages can quickly become a drag. In these cases, pagination is not a helpful navigation tool, but an interruption to the browsing experience. Infinite scrolling — while it does come with problems of its own — goes a long way towards creating smoother experiences.

This is especially true when you have to browse large amounts of information that’s split up into small chunks. Common examples include: Twitter, news sites, tumblogs, image galleries, and so on.

Of course, it’s not for everyone, or every project. For those of you who have decided to add some infinite love to your sites, there are several effective ways to easily apply it to your site:

Infinite scrolling for static sites

In most cases, you’ll probably be adding this kind of behavior to sites/apps that have dynamic content stored in a database. I’ve decided to include a link that revolves around static sites for two reasons:

  1. You may need to know how to do this specifically. You never know.
  2. Once you know how to add infinite scrolling to a static site, you’ll probably be able to adapt the same techniques to any CMS or CMS theme that you happen to be familiar with.

This tutorial from features two different jQuery plugins for your consideration, including Infinite Scroll by Paul Irish.

Infinite scrolling for WordPress sites

I’m not sure that there’s any sort of feature or functionality under the sun that hasn’t been made available for WordPress in the form of a plugin. Infinite scrolling is, of course, no exception.

First, we once again have Infinite Scroll. Yup. This jQuery plugin comes with an official Wordpress implementation also made by Paul Irish. The link is right there on the plugin’s main site, prominent and visible, right at the top. Also included on the page is a tutorial to help you configure the plugin to work with your specific WordPress theme, so be sure to check out the documentation.

Next, we have proof that Automattic, the company behind WordPress, loves us and wants us to be happy. They created a Jetpack module that will also add infinite scrolling to your theme. Again, you may need to customize the plugin to work with your specific theme.

But what if you want to dive deep into the code, and learn how to do it from scratch? WPTuts+ has you covered with this rather in-depth tutorial. Recommended for people with an intermediate understanding of front-end code, the tutorial comes with everything you need to hardcode infinite scrolling into your theme. Some would even argue that this is the “right way” to do it.

Infinite scrolling for Tumblr themes

Lots of designers, and some developers, make use of tumblr for sharing their thoughts and/or work. Are you one of them? Do you want your Tumblr theme to scroll infinitely, just like your dashboard? Look no further than Cody Sherman’s tutorial. Since it was written for the average, non-coding Tumblr user, this tutorial is dead simple. This comes at a cost, though, as it may not work with every Tumblr theme.

Mixing infinite scrolling with other plugins

jQuery Masonry is the classic plugin for creating masonry-style layouts on the web. (Personally, I think the name gives it away.) Since masonry layouts are all about displaying the small bits of information that are often well-served by infinite scrolling, it’s no surprise that many websites combine the two behaviors. (See: Pinterest) For static sites, you should check out the official documentation here.

Isotope is similar in function to Masonry, in that it was created to help people implement masonry layouts. I include it here because, in my opinion, it’s actually better. This is mostly because, through trial and error, I was able to make a truly responsive masonry layout with this jQuery plugin. I’ve had less luck with others. Your experiences may vary. Check out the documentation here.

Featured image/thumbnail, infinite scroll image via Shutterstock.

WDD Staff

WDD staff are proud to be able to bring you this daily blog about web design and development. If there's something you think we should be talking about let us know @DesignerDepot.

Read Next

20 Best New Websites, June 2024

Arranging content in an easily accessible way is the backbone of any user-friendly website. A good website will present…

Exciting New Tools for Designers, June 2024

In this month’s roundup of the best tools for web designers and developers, we’ll explore a range of new and noteworthy…

3 Essential Design Trends, June 2024

Summer is off to a fun start with some highly dramatic website design trends showing up in projects. Let's dive in!

15 Best New Fonts, May 2024

In this month’s edition, there are lots of historically-inspired typefaces, more of the growing trend for French…

How to Reduce The Carbon Footprint of Your Website

On average, a web page produces 4.61 grams of CO2 for every page view; for whole sites, that amounts to hundreds of KG…

20 Best New Websites, May 2024

Welcome to May’s compilation of the best sites on the web. This month we’re focused on color for younger humans,…

Has AI Killed User Testing?

Web designers employ user testing to evaluate a website’s functionality and overall UX (user experience). Various…

Exciting New Tools for Designers, May 2024

This year, we’ve seen a wave of groundbreaking apps and tools. AI is reshaping the industry, enhancing productivity,…

Using AI to Predict Design Trends

Design trends evolve at a blistering pace, especially in web design. On multi-month projects, you might work on a…

15 Best New Fonts, April 2024

Just like web design, type design follows trends. And while there’s always room for an exciting outsider, we tend to…

3 Essential Design Trends, May 2024

Integrated navigation elements, interactive typography, and digital overprints are three website design trends making…

How to Write World-Beating Web Content

Writing for the web is different from all other formats. We typically do not read to any real depth on the web; we…