【发布时间】:2017-10-13 04:55:15
【问题描述】:
我在我的网站上使用整页 js,并在其中一个部分中包含了 iframe。
如果您移至上例中的最后一部分,除非您滚动到 iframe 之外,否则您将无法进一步向下滚动。我发现整页中的这个方法可以用来向上移动一个部分。 fullpage method
$(document).on('click', '#moveUp', function(){
$.fn.fullpage.moveSectionUp();
});
此代码还可用于检测 iframe 是否已到达底部。 example iframe reaching bottom
$(window).scroll(function () {
if ($(window).scrollTop() == $(document).height() - $(window).height())
alert('Bottom reached');
});
link 中也讨论了这个问题,但我无法理解作为解决方案的解释。 iframe 到达顶部或底部后,如何使用这两个示例使页面上下滚动?
【问题讨论】:
标签: javascript jquery html iframe fullpage.js