在页面加载时打开覆盖(模态对话框)jquery工具

时间:2021-07-14 12:13:45

I was trying to open jquery tools overlay on page load. The default method for this "load()" not work and there is no error message inside the console. If I use .click() javascript method it work ok but .click() doesn't works on all browsers. Here is the code:

我试图在页面加载时打开jquery工具覆盖。此“load()”的默认方法不起作用,控制台内部没有错误消息。如果我使用.click()javascript方法,它可以工作,但.click()不适用于所有浏览器。这是代码:


$(function() {
//getoverlay = $("#atoaaa[rel]").overlay({mask: '#000'});
//getoverlay.click(); $("#content_598").overlay({mask: '#000', closeOnClick: false, load: false}).load();
});

This is the code of overlay module - https://gist.github.com/joshcartme/9063054

这是覆盖模块的代码 - https://gist.github.com/joshcartme/9063054

Any ideas?

1 个解决方案

#1


0  

The key is parameter data('overlay') load after method overlay()

关键是方法叠加后的参数数据('overlay')加载()

 $("#content_598").overlay({mask: '#000', closeOnClick: false, load: false});
 $('#content_598').data('overlay').load();

#1


0  

The key is parameter data('overlay') load after method overlay()

关键是方法叠加后的参数数据('overlay')加载()

 $("#content_598").overlay({mask: '#000', closeOnClick: false, load: false});
 $('#content_598').data('overlay').load();