Try to add iframe src for an iframe using online pdf url.
But is it possible to check if online pdf is scrolls down and reach the end (not HTML) ? Because if i try to print contentDocument, it's return null
HTML
<iframe id="myFrame" name="myFrame" class="scroll-y overlay" style="height:300px;"></iframe>
<label style="cursor:pointer;">
<input type="checkbox" id="chkTermAndCondition" disabled
onchange="handleChange(this);" />
Approve S and K.
</label>
JS
$("#myFrame").attr("src","https://upload.wikimedia.org/wikipedia/commons/4/40/GeneralBiology.pdf");
$("#myFrame").load(function () {
//console.log("myFrame load function");
var win_iframe = document.getElementById('myFrame').contentWindow;
var doc_iframe = document.getElementById('myFrame').contentDocument;
$(win_iframe).on("scroll", function() {
if ((win_iframe.innerHeight + win_iframe.scrollY) >= doc_iframe.body.offsetHeight) {
//console.log("aaa..! works perfectly!");
$("#chkTermAndCondition").removeAttr("disabled");
}
});
});