title: Detecting when div is scrolled to does not work
body: <p>I'm having trouble detecting when a certain section of the page is scrolled down to. Once I get down to a certain ID or Class, I'd like to run a couple of functions.</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/5672320/trigger-events-when-the-window-is-scrolled-to-certain-positions">this solution here</a>, and tried this below, but the code does not activate:</p>
  
  <pre><code>// Once you scroll into that div ID, this still does not get hit:
  $( "#slice_video" ).scroll(function() {
      console.log('in scroll...');    
  });
  
  
  // In the comments I also saw this solution, tried it but still nothing working:
  
  function isScrolledIntoView(elem) {
      // alert("method invoked");
      var docViewTop = $(window).scrollTop();
      var docViewBottom = docViewTop + $(window).height();
      var elemTop = $(elem).offset().top;
      var elemBottom = elemTop + $(elem).height();
      return ((elemBottom &gt;= docViewTop) &amp;&amp; (elemTop &lt;= docViewBottom) &amp;&amp; (elemBottom &lt;=      docViewBottom) &amp;&amp; (elemTop &gt;= docViewTop));
  }
  
  if (isScrolledIntoView($('.eco_jumbotron'))){
  
      // initialize modals:
      modals.wireModals($());
  
      // Animate in Tiles
      animateTiles();
  }
  </code></pre>
  
  <hr>
  
  <p><strong>JsFiddle for first solution:</strong>
  <a href="http://jsfiddle.net/leongaban/6n4bczmu/" rel="nofollow noreferrer">http://jsfiddle.net/leongaban/6n4bczmu/</a></p>
  
  <p><strong>JsFiddle for 2nd solution</strong>
  <a href="http://jsfiddle.net/leongaban/yxkqafwn/" rel="nofollow noreferrer">http://jsfiddle.net/leongaban/yxkqafwn/</a></p>