簡體   English   中英

試圖在 $(document).ready 上顯示 jqModal 對話框

[英]Trying to show a jqModal dialog on $(document).ready

我正在調整 jqModal 腳本以使用$(document).ready方法以 onLoad 方式啟動,但我在某處遇到問題。 我是stackoverflow的新手,我在這個地方聞到了大腦的味道。 (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

代碼的短端如下所示:

<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>

對此的任何幫助將不勝感激。

您永遠不會調用jqmShow來顯示對話框。 您只需使用jqm初始化其參數。

參考: http://dev.iceburg.net/jquery/jqModal/#how

更新

這是請求的代碼示例:

<script type="text/javascript"> 
    $(document).ready(function() {
        $('#rename').jqm();
        $('#rename').jqmShow(); // This is the line you need to add.
    });
</script> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM