$( "body").scroll( function() {
$( "#myDiv").load( "test.html");
});
Using this syntax, we can load content into divwhen the user scrolls. But before embedding in a div, I want to make sure that the div is in the viewport area when the user scrolls down.
If so, then I would like to load the external content into div. Please help me achieve my goal.
source
share