Created
May 16, 2019 21:31
-
-
Save magnuspedro/071c99bcefa5f645284f5117a6fec48b to your computer and use it in GitHub Desktop.
Detectar quando chegou no final do scroll do iframe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#iframe").ready(function() { | |
var iframe = document.getElementById("iframe").contentWindow; | |
$(iframe).scroll(function() { | |
if ($(iframe).scrollTop() + $(iframe).height() == $(iframe.document).innerHeight()) { | |
alert("Chegamos ao fim"); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment