CodePen

HTML

            
              
            
          
!

CSS

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

JS

            
                <script type="text/javascript">
		counter = 2;
 	  	$(document).ready(function (){
			function loadMore()
				{
				   console.log("More loaded");
					alert("test");
					$('.more_videos').load("/more_videos/"+counter);
					
				   $(window).bind('scroll', bindScroll);
				 }
				
				 function bindScroll(){
				   if($(window).scrollTop() + $(window).height() > $(document).height() - 100) {
					   $(window).unbind('scroll');
					   loadMore();
				   }
				}
				 
				$(window).scroll(bindScroll);​
	    });
	    counter = counter+1;
	</script>
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................