CodePen

HTML

            
              <div class="wrap">
  Scroll down to load iframe
</div>


<div class="iframe">
<iframe id="frame" src="" width="560" height="315" frameborder="0" allowfullscreen></iframe>
</div>


            
          
!

CSS

            
              .wrap {
  background:#aaa;
  height:1500px;
}

            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
function checkSize(){
  if($(window).width() > 1250 && $(window).scrollTop() + $(window).height() > $(document).height() - 700) {
    console.log('hello');
  }
}

checkSize();
$(window).scroll(checkSize);
$(window).resize(checkSize);

            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................