I have a simple PhoneGap application as fallows:
PhoneGap powered App
Try it this way :
document.addEventListener("deviceready", function(){ alert("123"); },true);