title: How to make web.py and jQuery UI work together?
body: <p>Can jQuery UI be used with web.py?  With jQuery and web.py, you can trigger events using jQuery or $$ (because $ is used by web.py for template variables) - but the same does not seem to be true with jQuery UI.  </p>
  
  <p>I get the following error from the code below: jQuery("#dialog").dialog is not a function.  The same code executes correctly outside of web.py framework.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
      &lt;title&gt;jQuery UI Example Page&lt;/title&gt;
      &lt;script src="http://code.jquery.com/jquery-1.7.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/usr/local/pos/templates/jquery-ui-1.8.18.custom.min.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          jQuery(function(){
  
              // Dialog           
              jQuery('#dialog').dialog({
                  autoOpen: false,
                  width: 600,
                  buttons: {
                      "Ok": function() { 
                          jQuery(this).dialog("close"); 
                      }, 
                      "Cancel": function() { 
                          jQuery(this).dialog("close"); 
                      } 
                  }
              });
  
              // Dialog Link
              jQuery('#dialog_link').click(function(){
                  jQuery('#dialog').dialog('open');
                  return false;
              });             
          });
  
      &lt;/script&gt;   
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;Hello&lt;/h1&gt;  
  
      &lt;h2&gt;Dialog&lt;/h2&gt;
      &lt;a href="#" id="dialog_link"&gt;Open Dialog&lt;/a&gt;
  
      &lt;!-- ui-dialog --&gt;
      &lt;div id="dialog" title="Dialog Title"&gt;
          &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.&lt;/p&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>