[ 
https://issues.apache.org/jira/browse/CB-5488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13966584#comment-13966584
 ] 

Garth Gutenberg commented on CB-5488:
-------------------------------------

Even better fix - this seems to work flawlessly, but requires modifying 
cordova.js:

Replace lines 1627-1630:

Old:
{code:JavaScript}
window.cordova = require('cordova');
// file: src/scripts/bootstrap.js

require('cordova/init');
{code}

New:
{code:JavaScript}
var documentBodyIntervalID = window.setInterval( function() {
    if ( null == document.body ) {
        return;
    }
    
    window.clearInterval( documentBodyIntervalID );

    window.cordova = require('cordova');
    // file: src/scripts/bootstrap.js

    require('cordova/init');
}, 100 );
{code}

> deviceready event not firing with jQuery Mobile
> -----------------------------------------------
>
>                 Key: CB-5488
>                 URL: https://issues.apache.org/jira/browse/CB-5488
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 3.1.0
>            Reporter: Federico Kereki
>            Assignee: Shazron Abdullah
>
> If you use PhoneGap + jQuery + jQuery Mobile, the deviceready event doesn't 
> fire. Googling around, I found several similar reports, all pointing out that 
> if jQuery Mobile isn't included, the event fires.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to