DOMWindow在页面加载

时间:2013-05-28 08:41:46

标签: jquery

很抱歉,如果这个问题重复,但我无法找到解决问题的方法。我有这样的事情:

<p><a href="#inlineContent" class="defaultDOMWindow">Open DOM Window</a></p> 
<script type="text/javascript"> 
$('.defaultDOMWindow').openDOMWindow({ 
eventType:'click', 
loader:1, 
loaderImagePath:'animationProcessing.gif', 
loaderHeight:16, 
loaderWidth:17  
}); 
</script> 
<div id="inlineContent" style=" display:none;"> 
<p>Inline Content</p> 
<p>Click overlay to close window</p> 
<p>Consequat ea Investigationes in enim congue. Option velit volutpat quod blandit ex.</p> 
<p>Erat usus lorem adipiscing non in. Nobis claram iusto et dolore facilisis. Claritatem decima velit decima ipsum wisi. Quinta ullamcorper sollemnes usus aliquip in. Ut aliquip velit tempor facit putamus. Habent duis et option quod facer. Delenit facer consequat seacula molestie notare. Qui tincidunt nobis lectores eleifend eorum. Decima usus facer id parum legere. Nonummy nonummy facilisis sit qui eodem. </p> 
</div>

我想将其更改为在页面加载时显示dom窗口。所以我想删除此链接并设置函数以在页面加载时加载dom窗口。我怎样才能做到这一点?提前感谢您的回答。

1 个答案:

答案 0 :(得分:0)

也许尝试这种解决方法:

 $('.defaultDOMWindow').openDOMWindow({
     eventType: 'click',
     loader: 1,
     loaderImagePath: 'animationProcessing.gif',
     loaderHeight: 16,
     loaderWidth: 17
 })
 $(window).load(function () {
     $('.defaultDOMWindow').trigger('click');
 });