如何在页面加载时调用SimpleModal OSX对话框? [英] How do I invoke a SimpleModal OSX dialog on page load?
本文介绍了如何在页面加载时调用SimpleModal OSX对话框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否有一种方法可以在页面加载时调用SimpleModal OSX对话框? 我尝试在页面加载时打开jquery模态对话框,但无法做到这一点.
I was wondering if there is a way to invoke the SimpleModal OSX dialog box on page load? I tried open jquery modal dialog on page load but wasn't able to make it happen.
当前,通过单击按钮/链接来调用对话框.我想在页面加载时调用它.
Currently, the dialog is invoked on clicking a button / link. I would like to invoke it on page load.
请帮助. :)
谢谢!
<script type='text/javascript' src='js/jquery.js'></script>
<script type='text/javascript' src='js/jquery.simplemodal.js'></script>
<script type='text/javascript' src='js/osx.js'></script>
<input type='button' name='osx' value='Demo' class='osx demo'/> or <a href='#' class='osx'>Demo</a>
<div id="osx-modal-content">
<div id="osx-modal-data">
<h2>Hello! I'm SimpleModal!</h2>
<p><button class="simplemodal-close">Close</button> <span>(or press ESC or click the overlay)</span></p>
</div>
</div>
推荐答案
您应该在此部分将该代码添加到osx.js脚本中:
You should add that code into osx.js script in this part:
$(document).ready(function() {
$("#osx-modal-content").modal({
overlayId: 'osx-overlay',
containerId: 'osx-container',
这篇关于如何在页面加载时调用SimpleModal OSX对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文