Try It Editor
Tip: Press
Ctrl/⌘ + Enter
to Run
▶ Run
Reset
Copy
Download
Code
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>jQuery UI - Basic Dialog</title> <link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://code.jquery.com/ui/1.13.2/jquery-ui.min.js"></script> <style> body{font-family:Arial, sans-serif; padding:20px;} </style> </head> <body> <h3>Basic Dialog</h3> <p>This dialog opens automatically as soon as the widget is created (no <code>autoOpen: false</code> here).</p> <div id="dialog" title="Basic dialog"> <p>This is the dialog's content.</p> </div> <script> $(document).ready(function(){ $("#dialog").dialog(); }); </script> </body> </html>
Output