尝试在 $(document).ready 上显示 jqModal 对话框
我正在调整 jqModal 脚本以使用 $(document).ready
方法以 onLoad 方式启动,但我在某处遇到了问题。我是 stackoverflow 的新手,我在这个地方闻到了大脑的味道。 (希望我是其中之一。)通过查看此 URL 的源代码可以看到完整的页面代码(相对较短): http://www.caycecookbook.com/pop_ups/jqm_onDocReady/jqm_docReady.html
代码的简短部分如下所示:
<script type="text/javascript">
$(document).ready(function() {
$('#rename').jqm();
});
</script>
<!-- POP-UP DIV -->
<DIV class="jqmWindow" id="rename" style="padding:18px 0px 12px 0px;">
<TABLE align="center" width="500" border="0" cellspacing="0" cellpadding="0" bgcolor="#7777777">
<TR><TD align="center"><P style="margin: 12px 12px 12px 12px;">
<img src="images/hey_there.jpg" width="504" height="360" border="0"></p></td></tr>
<TR><TD align="center" valign="middle">
<P style="margin:6px 0px 0px 0px;">
<a href="#" class="jqmClose" style="text-decoration:none; color:#ffffff;;
font-family: arial, helvetica, verdana, sans-serif; font-size:12px;
font-weight:bold;">Close</a>
</p>
</td></tr>
</table>
</div>
对此的任何帮助将不胜感激。
I'm adapting a jqModal script to launch in an onLoad fashion using the $(document).ready
method, but I'm getting something wrong somewhere. I'm new to stackoverflow, and I smell brains all over this place. (Wish I was one of them.) The full page code (relatively short) can be seen by viewing the source of this URL:
http://www.caycecookbook.com/pop_ups/jqm_onDocReady/jqm_docReady.html
The short end of the code looks like this:
<script type="text/javascript">
$(document).ready(function() {
$('#rename').jqm();
});
</script>
<!-- POP-UP DIV -->
<DIV class="jqmWindow" id="rename" style="padding:18px 0px 12px 0px;">
<TABLE align="center" width="500" border="0" cellspacing="0" cellpadding="0" bgcolor="#7777777">
<TR><TD align="center"><P style="margin: 12px 12px 12px 12px;">
<img src="images/hey_there.jpg" width="504" height="360" border="0"></p></td></tr>
<TR><TD align="center" valign="middle">
<P style="margin:6px 0px 0px 0px;">
<a href="#" class="jqmClose" style="text-decoration:none; color:#ffffff;;
font-family: arial, helvetica, verdana, sans-serif; font-size:12px;
font-weight:bold;">Close</a>
</p>
</td></tr>
</table>
</div>
Any help on this would be much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您永远不会调用
jqmShow
来显示对话框。您只需使用jqm
初始化其参数。参考:http://dev.iceburg.net/jquery/jqModal/#how
更新
以下是请求的代码示例:
You never call
jqmShow
to show the dialog. You only initialize its parameters withjqm
.Ref: http://dev.iceburg.net/jquery/jqModal/#how
Update
Here is the requested code example: