title: Responsive horizontal page sliding
body: <p>I want to create <strong>horizontal responsive page navigation</strong> as illustrated by the below image :
  <img src="https://i.stack.imgur.com/S7lWZ.jpg" alt="horizontal responsive page navigation transition"></p>
  
  <p>This is what I have managed to do : <a href="http://jsfiddle.net/dawidvdh/ZVgsk/" rel="nofollow noreferrer">DEMO</a></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-js lang-js prettyprint-override"><code>$(document).ready(function () {
      var slideNum = $('.page').length,
          wrapperWidth = 100 * slideNum,
          slideWidth = 100/slideNum;
      $('.wrapper').width(wrapperWidth + '%'); 
      $('.page').width(slideWidth + '%');
      
      $('a.scrollitem').click(function(){
          $('a.scrollitem').removeClass('selected');
          $(this).addClass('selected');
          
          var slideNumber = $($(this).attr('href')).index('.page'),
              margin = slideNumber * -100 + '%';
      
          $('.wrapper').animate({marginLeft: margin},1000);
          return false;
      });
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>html, body {
      height: 100%;
      margin: 0;
      overflow-x:hidden;
      position:relative;
  }
  nav{
      position:absolute;
      top:0; left:0;
      height:30px;
  }
  .wrapper {
      height: 100%;
      background: #263729;
  }
  .page {
      float:left;
      background: #992213;
      min-height: 100%;
      padding-top: 30px;
  }
  #page-1 {
      background: #0C717A;
  }
  #page-2 {
      background: #009900;
  }
  #page-3 {
      background: #0000FF;
  }
  a {
      color:#FFF;
  }
  a.selected{
      color: red;
  }
  
  
  .simulate{
      height:2000px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="wrapper"&gt;
      &lt;nav&gt;
          &lt;a href="#page-1" class="scrollitem selected"&gt;page 1&lt;/a&gt;
           &lt;a href="#page-2" class="scrollitem"&gt;page 2&lt;/a&gt;
           &lt;a href="#page-3" class="scrollitem"&gt;page 3&lt;/a&gt;
      &lt;/nav&gt;
      &lt;div id="page-1" class="page"&gt; 
           &lt;h3&gt;page 1&lt;/h3&gt;
          &lt;div class="simulate"&gt;Simulated content heigher than 100%&lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="page-2" class="page"&gt;  
           &lt;h3&gt;page 2&lt;/h3&gt;
          &lt;div class="simulate"&gt;Simulated content heigher than 100%&lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="page-3" class="page"&gt; 
          &lt;h3&gt;page 3&lt;/h3&gt;
          &lt;div class="simulate"&gt;Simulated content heigher than 100%&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have however hit a few brick walls, as mine is responsive to a certain degree, its just as you scale it needs to stick to the page its on and not reveal the others.</p>
  
  <p>Also if the pages are long it shows a scroll bar which is perfect, but on the last slide there is a gap as wide as the scroll-bar.</p>
  
  <p>I have the following Requirements:</p>
  
  <ol>
  <li>Needs to be Responsive</li>
  <li>pages need to be able to be long (800px) and still scrollable, without the gap on the last one.</li>
  <li>needs to work on minimum ie9</li>
  </ol>