Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 25th, 2013  |  syntax: None  |  size: 1.15 KB  |  views: 139  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Error: cannot call methods on dialog prior to initialization; attempted to call method 'close'.
  2. jquery-latest.js (line 507)
  3.        
  4. <!doctype html>
  5. <html lang="en">
  6.     <head>
  7.         <meta charset="utf-8" />
  8.         <title>jQuery UI Dialog</title>
  9.         <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
  10.         <link type="text/css" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" rel="stylesheet" />
  11.         <script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js" type="text/javascript"></script>
  12.         <script>
  13.             $(function() {
  14.                 $("#open").click(function(){$("#dialog").dialog('open');return false;});
  15.                 $( "#dialog" ).dialog({
  16.                     modal: true,
  17.                     autoOpen    : false,
  18.                     buttons: {
  19.                         Ok: function() {
  20.                             $( this ).dialog( "close" );
  21.                         }
  22.                     }
  23.                 });
  24.             });
  25.         </script>
  26.     </head>
  27.     <body>
  28.         <button id="open">Click</button>
  29.         <div id="dialog" title="What ever"></div>
  30.     </body>
  31. </html>