Advertisement
Guest User

Untitled

a guest
Mar 25th, 2013
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  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>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement