title: How to make continuous pull-out items?
body: <p>I would like to make continuous pull-out elements. I seem able to create one just fine, but am having difficulties creating any more than that. The effect I am after is that when you scroll down, item 2 gets revealed from underneath, and then when you keep scrolling, item 3 gets revealed from underneath item 2. I'd like this to keep going for as many items I add.</p>
  
  <p>Here's the first snippet, with 3 items. It is not working properly:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>html, body{
   padding: 0;
   margin: 0;
  }
  
  .text-center{
   text-align: center;
  }
  #item-1{
   position: relative;
   height: 500px;
   margin-bottom: 500px;
   background-color: white;
   border-bottom: 5px solid gray;
  }
  #item-2{
   background-color: green;
   border-bottom: 5px solid gray;
   z-index: -1;
  }
  #item-3{
   background: yellow;
   z-index: -1;
  }
  .slide-item{
   text-align: center;
   height: 500px;
   position: fixed;
   bottom: 0;
   left: 0;
   width: 100%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
   &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;Test&lt;/title&gt;
    &lt;link rel="stylesheet" href="style.css" type="text/css"&gt;
   &lt;/head&gt;
   &lt;body&gt;
  
   &lt;div id="item-1" class="text-center"&gt;
    First item!
    &lt;div id="item-2" class="slide-item text-center"&gt;
     Second item!
     &lt;div id="item-3" class="slide-item text-center"&gt;
      Third item!
     &lt;/div&gt;
    &lt;/div&gt;
   &lt;/div&gt;
   
   &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/3.0/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
   &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is another snippet, with only two items, which appears to be working, except the text isn't showing up (it shows up fine on my test page, though).</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>html, body{
   padding: 0;
   margin: 0;
  }
  
  .text-center{
   text-align: center;
  }
  #item-1{
   position: relative;
   height: 500px;
   margin-bottom: 500px;
   background-color: white;
   border-bottom: 5px solid gray;
  }
  #item-2{
   background-color: green;
   border-bottom: 5px solid gray;
   z-index: -1;
  }
  #item-3{
   background: yellow;
   z-index: -1;
  }
  .slide-item{
   text-align: center;
   height: 500px;
   position: fixed;
   bottom: 0;
   left: 0;
   width: 100%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
   &lt;head&gt;
    &lt;meta charset="UTF-8"&gt;
    &lt;title&gt;Test&lt;/title&gt;
    &lt;link rel="stylesheet" href="style.css" type="text/css"&gt;
   &lt;/head&gt;
   &lt;body&gt;
  
   &lt;div id="item-1" class="text-center"&gt;
    First item!
    &lt;div id="item-2" class="slide-item text-center"&gt;
     Second item!
    &lt;/div&gt;
   &lt;/div&gt;
   
   &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/3.0/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
   &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>