【发布时间】:2019-01-30 15:50:17
【问题描述】:
如何检测用户是否滚动到<embed> 元素的末尾?
<embed src="contract.pdf" type="application/pdf" width="800" height="800" id="contractPDF">
我使用了这段代码,但它不起作用:
$('#contractPDF').bind('scroll', function() {
if ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight) {
alert("end reched");
}
});
【问题讨论】:
标签: javascript jquery html pdf scroll