title: Check if scrollbar reached a div with jquery
body: <p>I'm trying to check when a div is reached from scrollbar with jquery.
  I read some similar question on stackoverflow, but all are on one div only.
  I have 4 div, with height: 100% and I want know when the scroll bar pass every div.
  I tried, but only works with the first div.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;body&gt;
  &lt;div id="main"&gt;&lt;/div&gt;
  &lt;div id="service"&gt;&lt;/div&gt;
  &lt;div id="clients"&gt;&lt;/div&gt;
  &lt;div id="about"&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>body, html {
      height: 100%;
      padding: 0px;
      margin: 0px;
  }
  #main {
      background: red;
      height: 100%;
  }
  #service {
      background: green;
      height: 100%;
  }
  #clients {
      background: blue;
      height: 100%;
  }
  #about {
      background: yellow;
      height: 100%;
  }
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$(document).ready(function() {
      var passed_service = false;
      var passed_service = false;
      $('body,html').bind('scroll mousedown wheel DOMMouseScroll mousewheel keyup', function(event){
          if($(window).scrollTop() &gt;= ($("#service").height())){
              if(!passed_service){
                  alert("To #service");
                  passed_service = true;
              }
          }
          if($(window).scrollTop() &gt;= ($("#service").height() + $("#clients").height())){
              if(!passed_clients){
                  alert("To #clients");
                  passed_clients = true;
              }
          } 
      });
  });
  </code></pre>
  
  <p>SORRY TO ALL, WAS A MY STUPID ERROR, I CAN'T DELETE THE QUESTION :(</p>