--- layout: default nav: tutorial ---

# Infinite Scroll

This tutorial will show you how to implement infinite scroll with only a few lines of IntercoolerJS.

### Video

### Outline

Here are the steps for implementing infinite scroll

- Extract a partial of the row rendering for your table, and add an id to the enclosing `tbody` so we can target it for appending.
- Add an empty `span` to the last element in the table that uses the `ic-append-from`, `ic-target`, and `ic-trigger-on` attributes to trigger appending to the table body.

### Git Diff

Here is a diff between the will-paginate code and Intercooler code:

https://github.com/LeadDyno/intercooler-tutorial-app/commit/13daf988bc86c5da1e62fea8def155e3e8ea5307