为什么这个jQuery code是不工作的黑莓? [英] Why this jquery code is not working on blackberry?
本文介绍了为什么这个jQuery code是不工作的黑莓?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用jquerymobile开发PhoneGap的应用程序。
I am developing phonegap app using jquerymobile.
但在黑莓9780它不显示我警告,我的code是
but in blackberry 9780 it does not show me alert, my code is
document.addEventListener('deviceready', run, false);
function run(){
$.getJSON('http://twitter.com/users/usejquery.json?callback=?', function(json){
alert(json.followers_count); // not displaying in blackberry
});
}
我的头的部分是:
My head part is :
<script src="phonegap.js">
</script>
<script src="jquery1.6.2.js">
</script>
<script src="jquery.mobile1.0b3.js">
它工作正常,在其他手机一样的Android,iPhone,iPad和还在我的Mozzila的浏览器8.0,但没有工作的黑莓OS 6。
It works fine in other mobiles like Android,iphone,ipad and also working on my Mozzila browser 8.0 but not working on blackberry OS 6.
请帮我。
感谢
推荐答案
有几件事情:
- 有JQM的新版本中,1.0 RC1,试着用这一个工作。
- 使用波纹模拟器由RIM测试更多quiccly的应用程序,是一个浏览器插件broser
和最重要的:
deviceready需求:
deviceready needs:
- 在你的身体做出这样的:
&LT;身体的onLoad ='initSO()'&GT;
然后在头部,后负荷:json2.js,phongap,jQuery的,jquerymobile ...把这个
then in the header, after loading: json2.js, phongap, jquery, jquerymobile... put this
function initSO() {
console.log('initSO()');
document.addEventListener("deviceready", onDeviceReadySO, true);
}
function onDeviceReadySO() {
console.log('hello word :D ');
}
这篇关于为什么这个jQuery code是不工作的黑莓?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文