I have a Jquery Dialog box which I want to open as soon as a page loads. I have some information on the page which is displayed at the background of the dialog box. When the page is hit, there is some delay in opening the dialog box (dont know why) , so the information at the background of the dialog box is shown first and after some time dialog box is shown. I dont want a user to see the information at the background and it looks ugly that after some time the dialog box opens. Can I get the dialog box open simulataneously as soon as the page is rendered? Below is the code,
$(document).ready(function()
{
$("#showForm").dialog({
autoOpen:true,
position:'center',
height:200,
width: 452,
modal: true
});
});
You could try putting the dialog command outside of $(document).ready(). Never tried it though.
Another option in general is to hide the info in the background and add an open event callback to display it: