As Rapahel integrate with modal window ??

As Rapahel integrate with modal window ??

Hi everyone

I need Rapahel integrate functions within a modal window.

Use the following code but Rapahel  is not within the modal window.

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="utf-8">
  5.   <title>dialog demo</title>
  6.   <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
  7.   <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  8.   <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
  9.   <script type="text/javascript" src="../js/vendor/raphael.js"></script>
  10. </head>
  11. <body>
  12.  
  13. <button id="opener">open the dialog</button>
  14. <div id="dialog" title="Dialog Title">I'm a dialog</div>
  15.  
  16. <script>
  17. $( "#dialog" ).dialog({ autoOpen: false });
  18. $( "#opener" ).click(function() {
  19.   $( "#dialog" ).dialog( "open" );
  20. paper = Raphael(0, 0, 200, 100);
  21. var backgraund = paper.rect(0,0,199,99).attr({fill: "rgb(187,198,191)"});  
  22.   
  23.   
  24. });
  25. </script>
  26.  
  27. </body>
  28. </html>





Any help or suggestion is welcome