incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moisés Gramary (Created) (JIRA) <>
Subject [jira] [Created] (CB-491) cordova-1.6.0 + jquery/zepto $(document).bind("deviceready".. no work
Date Thu, 12 Apr 2012 20:59:20 GMT
cordova-1.6.0 + jquery/zepto $(document).bind("deviceready".. no work

                 Key: CB-491
             Project: Apache Callback
          Issue Type: Bug
          Components: CordovaJS, iOS
    Affects Versions: 1.6.0
         Environment: Tested on iOS 5.1
            Reporter: Moisés Gramary
            Assignee: Filip Maj
             Fix For: 1.5.0

With Phonegap1.4 or 1.5, I have been OK with the code below, but now I stuck.
Anyone has an idea? Thanks.
    <meta name="viewport" content="width=device-width,
initial-scale=1.0, maximum-scale=1.0, user-scalable=no;"/>
    <meta charset="utf-8">

    <script type="text/javascript" charset="utf-8"
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript">

            alert("this Alert fires OK");

            $(document).bind("deviceready", function()
                alert("Got the Error and this Alert Never fires");



<p id="deviceProperties" style="font-size: 20px"></p>

(by KenOKABE on!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()


    document.addEventListener("deviceready", function()
    }, 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:!default.jspa
For more information on JIRA, see:


View raw message