javascriptjquerymodal-dialogoverlayjquery-tools

Open overlay (modal dialog) jquery tools on page load


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:


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

Any ideas?


Solution

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

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