troubleshooting Question

Make dialog open when document opens

Avatar of Richard Korts
Richard KortsFlag for United States of America asked on
jQuery
4 Comments1 Solution23 ViewsLast Modified:
I'm trying to get a jQuery dialog to run on the document load event.

I have this code:

<script>
      $( "#dialog" ).dialog({
                        width: 500
                  });
      $( "#opener" ).click(function(event) {      
        event.preventDefault();
         $( "#dialog" ).dialog( "open" );
      });
      </script>

and this:

<div id="dialog" title="Welcome">Welcome to backflowtestreport.com, you are now ready to complete your first form!</div>

right after the <body> tag

I removed the autoOpen: false, from the $("#dialog) definition thinking it would case it to show on load.

Instead it shows like in the attachment. I want it to show in a dialog OVER the page content, not like it is.

How can I fix this?

Thanks
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros