[ https://issues.apache.org/jira/browse/CB-491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13255817#comment-13255817 ] Moisés Gramary commented on CB-491: ----------------------------------- In that case I recommend you place some alert/console.log starting on the first line of onDeviceReady and moving it along the code until it no appears... but do not believe in "Error in success callback: NetworkStatus0 = TypeError: 'undefined' is not an object" error, because it's wrong. Maybe you are using an undefined variable into a plugin? > cordova-1.6.0 + jquery/zepto $(document).bind("deviceready") does not work > -------------------------------------------------------------------------- > > Key: CB-491 > URL: https://issues.apache.org/jira/browse/CB-491 > Project: Apache Callback > Issue Type: Bug > Components: CordovaJS > Affects Versions: 1.6.0 > Environment: Tested on iOS 5.1 > Reporter: Moisés Gramary > Assignee: Filip Maj > Priority: Minor > Labels: javascript, patch > Original Estimate: 2h > Remaining Estimate: 2h > > With Phonegap1.4 or 1.5, I have been OK with the code below, but now I stuck. > Anyone has an idea? Thanks. > > > > > > > > > >

> > > (by KenOKABE on https://groups.google.com/forum/?hl=en?hl%3Den&fromgroups#!topic/phonegap/TImcr9kzlq0) > Possible solution--> > Hello, I had the same problem with the upgrade from 1.5 to 1.6... > After a long day I found that that deviceready event begins a little "freak", try changing: > $(document).bind("deviceready", function() > { > //code > }); > by: > document.addEventListener("deviceready", function() > { > //code > }, false); > It worked for me, even so, the most weird thing is that other events like touchmove or orientationchange still works with $( document ).bind; even $( document ).ready function works.... > Appears to fail only with deviceready PG/CV event.... > (by Moisés Gramary Barbosa on same thread) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira