滚动时显示弹出窗口 [英] Display popup when scrolling
本文介绍了滚动时显示弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用colorbox,想知道您是否知道访问者滚动网站时弹出窗口的任何方式.
I'm using colorbox and wanted to know if you know any way to display the popup when the visitor is scrolling the site.
我知道可以在页面加载时显示弹出窗口,并在X秒后显示弹出窗口.但这对我没有帮助.
I know it's possible to display the popup when the page loads and to display the popup after X seconds. But that does not help me.
当访问者向下滚动页面时,我看到一些显示弹出窗口的网站.
I saw some websites that display the popup when the visitor scrolls down the page.
该怎么做?
推荐答案
您可以使用以下内容:
$(window).scroll(function() {
//open popup
});
只要用户滚动,滚动事件就会调用.
The scroll event will call whenever the user scrolls.
这篇关于滚动时显示弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文