Android的表现jQuery的PhoneGap的问题 [英] android performance jquery phonegap issue
问题描述
我们正在开发使用PhoneGap的1.1.0和jQuery 1.0rc1缩小的文件,一个Android应用程序。性能很慢在android device.DOM加载需要时间来load.How我们优化了DOM装载Android中
We are developing an Android application using phonegap 1.1.0 and jquery 1.0rc1 minified file. The performance is very slow in the android device.DOM loading takes time to load.How do we optimize the dom loading in Android
推荐答案
是的,Android的Web视图不正是对于一些花哨的东西,jQuery也进行了优化。我的建议是尝试jQuery的最新版本,因为他们刚刚发布了1.0版。还有,你可以尝试禁用一些特效来获得一些性能优势。
Yeah, Android's web view is not exactly optimized for some of the fancy things that jQuery does. My advice is to try the latest version of jQuery as they just released version 1.0. As well you can try disabling some of the effects to get some performance benefits.
<script type="text/javascript">
$(document).bind("mobileinit", function() {
$.mobile.autoInitializePage = false;
$.mobile.defaultPageTransition = 'none';
$.mobile.touchOverflowEnabled = false;
$.mobile.defaultDialogTransition = 'none';
$.mobile.loadingMessage = 'Daten werden geladen...' ;
});
</script>
这篇关于Android的表现jQuery的PhoneGap的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!