title: How do I load phonegap/cordova with jade?
body: <p>I am developing a Web Application using node.js, express and jade.  I have the following jade template which I am seeing using a WebView in a Phonegap application:</p>
  
  <pre><code>doctype mobile
  html
      head
          script(src="cordova-2.1.0.js")
          script
              var ready = function() {
                  alert(\'Ready\');
              }
              document.addEventListener("deviceready", ready);
          title= title
          link(rel='stylesheet', href='/stylesheets/style.css')
      body
          block content
              h1= title
              button(id='vibrateButton', onclick='navigator.notification.vibrate(2000);')Confirm
              #services
                  - each service in services
                      div.service
                      a(href=service.link)!= service.name
                      div.desc= service.description
  </code></pre>
  
  <p>What this template will produce is a webpage with a list of items (a description and a link) which will be fetched from a mongo database.  The page is served using node.js</p>
  
  <p>Now, the cordova script is not loading because the alert ("Ready") is not being displayed.  Also, if I hit the button the device won't vibrate and the console will display the following message:</p>
  
  <pre><code>Uncaught TypeError: Cannot call method 'vibrate' of undefined at http://xx.xxx.xx.x:3000/:5
  </code></pre>
  
  <p>How can I include the Phonegap script using jade? I have tried to load simple scripts with just an alert and it works, but in this case I don't know why it is not working.  </p>
  
  <p>Could anyone provide advise please? Thanks.</p>