Lee*_*lla 2 jquery ios cordova
我有一个运行在机器人设备上的功能完善的phonegap应用程序.但是,当我将事情移交给iOS时,该deviceReady
方法永远不会触发.
HTML HEADER
<head>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi' name='viewport' />
<meta charset='utf-8' />
<link href='stylesheets/application.css' rel='stylesheet' />
<link href='http://code.jquery.com/mobile/1.0rc2/jquery.mobile.structure-1.0rc2.min.css' rel='stylesheet' />
<link href='stylesheets/application.css' rel='stylesheet' />
<script src='http://code.jquery.com/jquery-1.6.4.min.js'></script>
<script src='http://code.jquery.com/mobile/1.0rc2/jquery.mobile-1.0rc2.min.js'></script>
<script src='javascripts/application.js'></script>
<script src='javascripts/phonegap-1.2.0.js'></script>
</head>
Run Code Online (Sandbox Code Playgroud)
的application.js
$(function() {
document.addEventListener("deviceready", function(){alert(2)}, false);
});
Run Code Online (Sandbox Code Playgroud)
如果我在$(function(){})
其中发出警报功能,那么我知道jquery和application.js已经加载了.一个alert()
在phonegap.js也火灾,确认已还加载.
Dev*_*eks 10
您是否在iOS应用中使用Android应用中的phonegap-1.2.0.js?换句话说,你也复制了吗?
PhoneGap拥有每个平台的phonegap-1.x.js文件.确保您使用的是iOS?
归档时间: |
|
查看次数: |
2213 次 |
最近记录: |