title: Javascript ScrollTo anchor
body: <p>Hello guys I have a problem with the javascript (i m not a big fan of this language :)). So I would like on my website an automatic Scroll : i have four div,which one has the same height (depends on the size of your screen). I want when i scroll to the bottom (or the top) that the slider goes directly to the next div (or previous), like a magnet. So I tried the scrollTo but i don t know how it works because i have to listen the scroll... so here is my html:</p>
  
  <pre><code>&lt;!--Samsung Galaxy--&gt;
      &lt;div  class="bloc" id="samsungtab"&gt;
          &lt;img src="images/samsung.png" alt="samsunggalaxytab" /&gt;
      &lt;/div&gt;
  
  &lt;!--ORA--&gt;
      &lt;div class="bloc" id="ora"&gt;
          &lt;img src="images/ora.png" alt="logo" /&gt;    
      &lt;/div&gt;
  
  &lt;!--Oculus Rift--&gt;
      &lt;div class="bloc" id="oculus"&gt;
          &lt;img src="images/oculus.jpg" alt="logo" /&gt;
      &lt;/div&gt;
  
  &lt;!--Acer--&gt;
      &lt;div class="bloc" id="acer"&gt;
          &lt;img src="images/acer.jpg" alt="logo" /&gt;                
      &lt;/div&gt;
  </code></pre>
  
  <p>and the javascript for the automatic size of the different div:</p>
  
  <pre><code>$(document).ready( function(){
      var hauteur = (document.documentElement.clientHeight);
      var position = hauteur/4;
      $(".bloc").css("height",hauteur);
      $("#samsungtab").css("margin-top",position);
      $("#ora").css("margin-top",position);
      $("#oculus").css("margin-top",position);
      $("#acer").css("margin-top",position);
  });
  </code></pre>
  
  <p>Thank you very much in advance for your help!!!!</p>
  
  <p>Tom</p>