title: cordova: deviceready not firing
body: <p>I am trying to create login page where i am using ajax to validate the data. It is working fine if i use document ready but when i used <code>document.addEventListener("deviceready", onDeviceReady, false);</code> it is not firing the ajax.</p>
  
  <p>Here is the code which i have at the moment.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  document.addEventListener("deviceready", onDeviceReady, false);
  function onDeviceReady() {
      //$('document').ready(function()
  //{
  
      $("#login").on("submit", function(e) {      
      alert('test');
  some ajax code goes here
  
  });
  };
  &lt;/script&gt;
  </code></pre>
  
  <p>This code is inside foot section. i have included cordava.js in head section.</p>
  
  <p>Please advise what am i doing wrong.</p>