title: Compare ScrollTop With offset.top of element
body: <p>I have this code to calcule top of element and compare with the scrollTop and do any action.</p>
  
  <p>The problem is , it not enter to the condicional "if"</p>
  
  <p>Any idea ?</p>
  
  <pre><code>jQuery( document ).ready(function() {
  
     var h = parseInt(jQuery(".noticiasFoldsHome").height()) / 2 ;
  
     var x = parseInt(jQuery(".noticiasFoldsHome").offset().top) - parseInt(h);
  
     jQuery(window).scroll(function (event) {
          var scroll = jQuery(window).scrollTop();
          //console.log(scroll);
  
          if ( parseInt(scroll) == parseInt(x) ){
              console.log("entro");
          }
  
      });
  
  
  
  });
  </code></pre>