每 3 小时显示一次对话框
Display Dialog Box once every 3 hours
在我的网站上工作,但希望它每 2-3 小时只显示一次:-https://www.helpingtechie.com
这不是我的代码,只是从给我的网站下载。
我认为需要添加饼干。
使用的代码:-
.guestwarn-mask{
position:absolute;
background:#fff;
opacity:0.5;
filter:alpha(opacity=50);
z-index: 4;
overflow: hidden;
}
.guestwarn-layout{
-moz-transform: scale(0);
-webkit-transform: scale(0);
-ms-transform: scale(0);
-o-transform: scale(0);
transform: scale(0);
-webkit-transition: all 500ms cubic-bezier(0.39, 1.42, 0.48, 1) 250ms;
-moz-transition: all 500ms cubic-bezier(0.39, 1.42, 0.48, 1) 250ms;
-ms-transition: all 500ms cubic-bezier(0.39, 1.42, 0.48, 1) 250ms;
-o-transition: all 500ms cubic-bezier(0.39, 1.42, 0.48, 1) 250ms;
transition: all 500ms cubic-bezier(0.39, 1.42, 0.48, 1) 250ms;
position:absolute;
border:1px solid #eee;
background:#fff;
box-shadow: 1px 2px 4px rgba(100,100,100,0.1);
display:none;
z-index:5;
}
.guestwarn-layout-animate{
-moz-transform: scale(1);
-webkit-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
.guestwarn-layout-close{
-webkit-transition: all 900ms cubic-bezier(.37,-0.99,.24,.24) 100ms;
-moz-transition: all 900ms cubic-bezier(.37,-0.99,.24,.24) 100ms;
-ms-transition: all 900ms cubic-bezier(.37,-0.99,.24,.24) 100ms;
-o-transition: all 900ms cubic-bezier(.37,-0.99,.24,.24) 100ms;
transition: all 900ms cubic-bezier(.37,-0.99,.24,.24) 100ms;
top:-300px !important;
}
.guestwarn-content{
position:relative;
color:#555;
overflow:hidden;
}
.guestwarn-title{
position:absolute;
left:0px;
top:0px;
height:40px;
width:100%;
overflow:hidden;
background:#eee;
font:normal 16px Microsoft Yahei;
color:#fff
}
.guestwarn-title span{
display:block;
float:left;
padding:10px 20px;
background:#08c;
}
.guestwarn-close{
position:absolute;
right:0px;
top:0px;
background:#E04343;
display:block;
text-decoration:none;
font-family:Tahoma;
font-size:20px;
line-height:37px;
height:40px;
width:40px;
text-align:center;
color:#fff
}
.guestwarn-close:hover{
opacity:0.8;
filter:alpha(opacity=80);
}
.guestwarn-html{
padding:50px 20px 20px 20px;
font:normal 16px Microsoft Yahei;
line-height: 150%;
text-align:left;
}
.guestwarn-html a{
color:#58f
}
<script src="https://www.helpingtechie.com/jscripts/jquery.guestwarn.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(function(){
$.guestwarn({
mask:true,
height: 'auto',
title:'Dear Guest',
html:'If you read this, it means you are not registered. <br><a href="/member.php?action=register" target="_blank">Click here</a> to register in a few simple steps, you will enjoy all features of our Forum.',
callback:function(){
console.log('CALLBACKS')
}
});
});
</script>
如果我完全
理解你的"问题"......这可以帮助:
$(function(){
setInterval(function() {
$.guestwarn({
mask:true,
height: 'auto',
title:'Dear Guest',
html:'If you read this, it means you are not registered. <br><a href="/member.php?action=register" target="_blank">Click here</a> to register in a few simple steps, you will enjoy all features of our Forum.',
callback:function(){
console.log('CALLBACKS')
}
});
}, 10800000);
// 10800000 is 3 hours in miliseconds
});
相关文章:
- 每隔X秒显示一次警报框,但请先等待Y秒
- jQuery UI对话框在页面上只显示一次
- 每 3 小时显示一次对话框
- jQuery UI 对话框模式仅使用类选择器打开一次
- Jquery UI对话框只显示一次
- 如何在关闭一次对话框后禁用该对话框
- 关闭JQueryUI对话框只能工作一次
- 停止调用一次提示框'取消'点击
- 在进入页面时显示一次警告框
- 对话框'动态内容只显示一次后,第一个按钮点击
- jQueryUI模态对话框中的脚本只工作一次
- jPicker重置重置按钮上的背景颜色,以及我如何一次打开单个jPicker对话框
- 显示对话框只一次(实现脏位系统)与GDrive脚本
- jQuery UI对话框只打开一次
- 每隔x秒清除一次输入框
- rails 3.2:确认删除.在开发中,confim对话框打开一次,但在生产中,它打开三次
- 为什么这个JQuery对话框一次又一次地出现
- jQuery,只允许一次点击对话框是按钮
- 为什么从文件选择对话框中选择一次后不能立即再次选择同一文件
- 每个用户显示一次jquery对话框