在页面加载中打开弹出窗口 [英] open popup in page load
本文介绍了在页面加载中打开弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨伙计们,
我有一些代码,当我点击按钮弹出窗口时会打开但弹出窗口应该在页面加载时打开请给我解决方案的人。 。
hi guys ,
I have some code that , when i click on button popup will open but the popup should open on page load please give me solution guys ..
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="js/jquery.reveal.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#button').click(function (e) { // Button which will activate our modal
$('#modal').reveal({ // The item which will be opened with reveal
animation: 'fade', // fade, fadeAndPop, none
animationspeed: 600, // how fast animtions are
closeonbackgroundclick: true, // if you click background will modal close?
dismissmodalclass: 'close' // the class of a button or element that will close an open modal
});
return false;
});
});
</script>
这是我点击按钮弹出的代码会打开,但在页面加载弹出窗口应该打开请帮帮我伙计..
谢谢你
this is the code when i click on buton popup will open ,but in page load popup should open please help me guys..
thanks you
推荐答案
( document )。ready( function (){
(document).ready(function () {
(' #button')。click( function (e){ // 将激活模态的按钮
('#button').click(function (e) { // Button which will activate our modal
(' #modal')。reveal({ // 将要使用的项目以揭示
动画打开:' fade', // fade,fadeAndPop,none
animationspeed: 600 , // 动画的速度有多快
closeonbackgroundclick: true , // 如果单击背景将模态关闭?
dismissmodalclass:' < span class =code-string> close' // 将要使用的按钮或元素的类关闭开放模式
});
return false ;
});
});
< / script>
('#modal').reveal({ // The item which will be opened with reveal animation: 'fade', // fade, fadeAndPop, none animationspeed: 600, // how fast animtions are closeonbackgroundclick: true, // if you click background will modal close? dismissmodalclass: 'close' // the class of a button or element that will close an open modal }); return false; }); }); </script>
这是我点击按钮弹出的代码会打开,但在页面加载弹出窗口应该打开请帮帮我伙计..
谢谢你
this is the code when i click on buton popup will open ,but in page load popup should open please help me guys..
thanks you
这篇关于在页面加载中打开弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文