title: backbutton in phonegap not getting registered and not working properly
body: <p>I am using phonegapand i am registering backbutton <code>onDeviceReady</code> Function but getting function called when clicked on device's back button. and i have added </p>
  
  <pre><code>&lt;script src="lib/cordova-2.6.0.js"&gt;&lt;/script&gt;
  
  document.addEventListener("backbutton", onBackClickEvent, false);
  
  function onBackClickEvent() {
      alert("back onBackClickEvent");     
  }
  </code></pre>
  
  <p>This <code>onBackClickEvent()</code> function is not getting called, I've never seen that alert poped up. I am also getting an error of Uncaught ReferenceError: cordova is not defined</p>
  
  <p>what could be the error Please suggest me. Thanks in advance.</p>