Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 15A459CE3 for ; Thu, 14 Jun 2012 13:07:44 +0000 (UTC) Received: (qmail 14757 invoked by uid 500); 14 Jun 2012 13:07:43 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 14703 invoked by uid 500); 14 Jun 2012 13:07:43 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 14643 invoked by uid 99); 14 Jun 2012 13:07:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jun 2012 13:07:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 2CFBC1404B4 for ; Thu, 14 Jun 2012 13:07:43 +0000 (UTC) Date: Thu, 14 Jun 2012 13:07:43 +0000 (UTC) From: "Craig Nusinov (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1531103779.15554.1339679263188.JavaMail.jiratomcat@issues-vm> In-Reply-To: <321373953.19167.1334264360909.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CB-491) cordova-1.6.0 + jquery/zepto $(document).bind("deviceready") does not work MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-491?page=3Dcom.atlassian.jir= a.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13295010= #comment-13295010 ]=20 Craig Nusinov commented on CB-491: ---------------------------------- Hi, this is my first post and I was kindly referred by Shazron. I upgraded= from PG 1.2.0 to Cordova 1.7.0 and having all kinds of issues. I can't se= em to find a solution, but first things first - I can not even get a simple= date.js file to execute in my index.html file. Here is what I am doing, I= know I am probably missing something pretty simple, maybe someone can poin= t me in the correct direction. Thank you! index.html: =20 =09 =09 =09 =09 =20 =20 =20 =20


=20 =09

Hey, it's Cordova!

=09

Don't know how to get started? Check out our Getting Started Guide =09
=09

    =09=09
  1. Check your console log for any white-list rejection errors.
  2. =09=09
  3. Add your allowed hosts in Cordova.plist/External= Hosts (wildcards OK, don't enter the URL scheme)
  4. =09
today.js - javascript file: // today.js // This script indicates the current date and time. // Call this function when the page has loaded: function init() { =20 // Want to be strict: 'use strict'; // Create a Date object: var today =3D new Date(); // Create a custom message: var message =3D 'Today is ' + today.toLocaleDateString(); =20 =20 // Get a reference to the paragraph: var output =3D document.getElementById('output'); =20 // Update the innerText or textContent property of the paragraph: =09if (output.textContent !=3D=3D undefined) { =09=09output.textContent =3D message; =09} else { =09=09output.innerText =3D message; =09} =20 } // End of init() function. window.onload =3D init; =20 > cordova-1.6.0 + jquery/zepto $(document).bind("deviceready") does not wor= k > -------------------------------------------------------------------------= - > > Key: CB-491 > URL: https://issues.apache.org/jira/browse/CB-491 > Project: Apache Cordova > Issue Type: Bug > Components: CordovaJS > Affects Versions: 1.6.0 > Environment: Tested on iOS 5.1 > Reporter: Mois=C3=A9s 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 st= uck. > Anyone has an idea? Thanks. > > > initial-scale=3D1.0, maximum-scale=3D1.0, user-scalable=3Dno;"/> > > > > > > >

> > > (by KenOKABE on https://groups.google.com/forum/?hl=3Den?hl%3Den&fromgrou= ps#!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 "fre= ak", 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=C3=A9s Gramary Barbosa on same thread) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira